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).
Related
I know Kind needs Docker, and Minikube needs Virtual Box - but for learning Kubernetes features are they the same?
Thank you.
In terms of learning Kubernetes features, they are the same. You will get the same Kubernetes and Kubernetes resources in both: Pod, Deployments, ConfigMaps, StatefulSets, Secrets, etc. assuming they both have the same Kubernetes version.
Under the hood they very similar too with some implementation differences.
Minikube
Runs K8s in VM (1.7.0 vesion now supports running minikube on Docker)
Support multiple Hypervisors (VirtualBox, Hyperkit, parallels, etc)
You need to ssh to VM to run docker. (minikube ssh)
On the positive side, if you are using VMs, you get the VM isolation which is 'more secure' per se.
Update: It does support running in docker with --driver=docker
Kind
Runs Docker in a VM (Part of the docker desktop installation for Mac, or Windows)
Runs Kubernetes in that "Docker" VM
Supports Hyperkit (Mac) or Hyper-V (Windows) hypervisors.
Has the convenience that you can run the docker client from your Mac or Windows.
You can actually run it in Linux with no need to use a VM (It's a docker native installation on Linux)
It runs all K8s components in a single container.
I have tried creating Kubernetes cluster but all the nodes are linux based OS(Container-Optimized OS (cos) (default) and Ubuntu). I have windows based image stored on docker Hub I need to deploy this app to kubernetes cluster. I am using https://console.cloud.google.com/kubernetes/ to create cluster.
While creating nodes, in setting there are only two options: Container-Optimized OS (cos) (default) and Ubuntu.
Windows is not supported by Google Kubernetes. There is a feature request that you can track: Feature request : Support for Windows Server Containers in GKE
You can launch your own Google Compute VM and run Windows containers. This article provides more information.
I don't think you can run Windows nodes in GKE, even though Kubernetes itself supports Windows nodes (https://kubernetes.io/docs/getting-started-guides/windows/).
In my opinion, the other options you have are:
Run an on-prem Kubernetes cluster with your Windows licenses (the control plane would still run with Linux, only the nodes would be Windows based)
Use GCE instead of GKE to run your containers: https://cloud.google.com/compute/docs/containers/ and https://cloud.google.com/blog/products/gcp/how-to-run-windows-containers-on-compute-engine
Hope that helps!
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.
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.
If i have installed K8S using minikube, where will the master node components be installed. (Ex: the api server, replication controller, etcd etc)
Is it in the host? or the VM?
I understand the worker node is the VM configured by minikube
Everything is installed in the Virtual Machine. Based on the localkube project, it is creating an All-in-one single-node cluster.
More information here: https://github.com/kubernetes/community/blob/master/contributors/design-proposals/cluster-lifecycle/local-cluster-ux.md