Can I setup kubernetes cluster using kubeadm on ubuntu machines inside a office LAN - kubernetes

I was looking at this url.
It says-"If you already have a way to configure hosting resources, use kubeadm to easily bring up a cluster with a single command per machine."
What do you mean by "If you already have a way to configure hosting resources"?
If I have a few Ubuntu machines within my office LAN can I setup Kubernetes cluster on them using kubeadm?

It just means that you already have a way of installing an OS on these machines, booting them, assigning IPs on your LAN and so. If you can SSH into your nodes to be you are ready!
Follow the guide carefully and you will have a demo cluster in no time.

Related

Solutions to create a cluster split on 2 VMs

I'm looking for some clues on which solution can help me on my problem which is running a kubernetes cluster between 2 VMs.
I'm beginning with Kubernetes and all its possibilities but like everybody I started from a minikube single-node cluster to host my 4 containers respectively hosting mongoDB, redis, rabbitMQ and minio.
The idea is that I need something like minikube to create a cluster like this:
Moreover, these 2 VMs will run on RedHat EL 7 and won't be local and they may be hosted on different machines
Is it possible to build that architecture with kubeadm?
Response is yes, it can be achieved with kubeadm, it will allow you to aggregate your different VM/hosts into the cluster in the same way docker-swarm does by kind of subscribing them into the cluster.
See how (thanks #Jason Stanley)
Some Prerequisites
If like me you're on a client infrastructure, implementing your solution 'on-premise' on a Red Hat environment, you'll need two or three things.
The proper docker environment
An image registry
An easy way to configure your cluster
Docker environment
First one and because it's a restriction meant by docker and red hat is to use docker-ee the enterprise edition which allow support on prod by red hat, which is why most people pay a red hat subscription.
See typical architecture using docker-ee and how to install that on Red Hat
Local image registry
The other thing is to deploy a docker registry, this is an official image (documentation here) provided by Docker team, registry will allow your cluster to pull the image from it - images that you will push inside while setting everything up - note that this is relevant in a restricted environment where your VM/hosts can't have access to internet or use a proxy.
Cluster setting tool
One handy tool is using helm which allow you to set your cluster easily by referencing which images provide a given service, on which port with which policy.
Helm documentation

Kubernetes in Vsphere Virtual machines

Dears,
Sorry may be a basic question for some of you. If i have a Vsphere Environment and i am allowed to access only 2 Virtual machines inside them. Can I set kubernetes cluster with 1 VM as master and 1 VM as Minion without interacting with the hypervisor or the Vsphere center ?
In this case what are the requirements
I already set up an environment in my Laptop but i should define a host only network in Virtualbox and define the machines also for the host ? should that be the same in case of Vsphere ?
There are some requirements for Kubernetes cluster. According to the official documentation it is necessary to have:
One or more machines running one of:
Ubuntu 16.04+
Debian 9
CentOS 7
RHEL 7
Fedora 25/26 (best-effort)
HypriotOS v1.0.1+
Container Linux (tested with 1800.6.0)
2 GB or more of RAM per machine (any less will leave little room for your apps)
2 CPUs or more
Full network connectivity between all machines in the cluster (public or private network is fine)
Unique hostname, MAC address, and product_uuid for every node. See here for more details.
Certain ports are open on your machines. See here for more details.
Swap disabled. You MUST disable swap in order for the kubelet to work properly.
Also, IP subnets for Services and for Pods must not interfere with IP subnets in the same VPC.
To set up Kubernetes cluster it is enough to have SSH access to VMs. Additional network interfaces are not required.
If you already have VMs, the most convenient tool for cluster creation is kubeadm. Please, consider reading the following part of official documentation:
Creating a single master cluster with kubeadm

Adding nodes to a Windows Minikube Kubernetes Installation - How?

I have MiniKube running on my Windows 10 machine. I would like to add an additional node to the cluster.
I have a Centos VM running on a different host that has k8s installed. How to I get the kubectrl join command to run on the VM from the master node running on my Windows machine?
Do I need to install an overlay network on the MiniKube VM? Or is one already installed?
Minikube is officially single-node at the moment. There's a discussion about this limitation at https://github.com/kubernetes/minikube/issues/94 But it seems people have found ways to do it with VirtualBox and there are other ways to run a multi-node cluster locally. Otherwise I'd suggest creating a cluster with one of the cloud providers (e.g. GKE).

Creation of nodes in VMs by using Kubernetes kubeadm and minikube

I am trying to create Kubernetes cluster with different number of nodes using same machine. Here I want to create separate VMs and need to create node in those VMs. I am currently exploring about kubeadm and minikube for these tasks.
When I am exploring I had the following confusions:
I need to create 4 number of nodes each need to create in different VMs. Can I use kubeadm for these requirement?
Also found that Minikube is using for creating the single node structure and also possible to use to creation of VMs. What is the difference between kubeadm and minikube ?
If I want to create nodes in different VMs which tool should use along with installation of Kubernetes cluster master?
If I am using VMs, then can I directly install VMware workstation / virtualbox in my Ubuntu 16.04 ?
In AWS EC2, they already giving the Ubuntu as a virtual machine. So is possible to install VMware workstation on ubuntu? Since it is VMs on another VM.
Kubeadm should be a good choice for you. It is quite easy to use by just following the documentation. Minikube would give you only single node Kubernetes. As of minikube 1.10.1, it is possible to use multi-node clusters.
Kubeadm is a tool to get Kubernetes up and running on already existing machine. It will basically configure and start all required Kubernetes components (for minimum viable cluster). Kubeadm is the right tool to bootstrap the Kubernetes cluster on your virtual machines. But you need to prepare the machines your self (install OS + required software, networking, ...). kubeadm will not do it for you.
Minikube is a tool which will allow you to start locally single node Kubernetes cluster. This is usually done in a VM - minikube supports VirtualBox KVM and others. It will start for you the virtual machine and take care of everything. But it will not do a 4 node cluster for you.
Kubeadm takes care of both. You first setup the master and then use kubeadm on the worker nodes to join the master.
When you use Kubeadm, it doesn't really care what do you use for the virtualization. You can choose whatever you want.
Why do you want to run virtual machines on top of your EC2 machine? Why not just create more (perhaps smaller) EC2 machines for the cluster? You can use this as an inspiration: https://github.com/scholzj/terraform-aws-kubernetes. There are also some more advanced tools for setting up the whole cluster such as (for example) Kops.

Production ready Kubernetes cluster on Linux VM

We are running all our applications in Linux VM's and tried Kubernetes cluster on local Mac using minikube and it looks promising.
Interested in setting up Kubernetes on Linux VM's, but:
Is is possible to setup production ready cluster on Linux VM's?
As shown in kubernetes/kubeadm issue 465, setting up a cluster using VMs can be a challenge.
Using Calico will help, since it provides secure network connectivity for containers and virtual machine workloads.
Use Calico 2.6.