How to create Kubernetes cluster with multiple nodes on Windows

12/6/2019

All kubernetes forums and articles ask to work with minikube that gives you only a single-node kubernetes cluster.

What options are available to work with multi node kubernetes cluster on a Windows environment?.

-- Suriyakanth
docker
kubernetes
kubernetes-cluster

3 Answers

4/1/2020

I was able to create a multi node kubernetes cluster on my windows box using Oracle virtual box.!

-- Suriyakanth
Source: StackOverflow

3/23/2020

On my windows-10 laptop, I used virtualbox to create 2 ubuntu VMs (Each VM -> 3 GB RAM and 50 GB dynamically sized virtual disks). I used microk8s from https://microk8s.io. Very simple one line installation on each VM: sudo snap install microk8s --classic

Follow instructions at https://microk8s.io/docs/clustering .... one VM becomes the master k8s node and the other VM becomes the worker node joined to the master.

Once that is setup, you may want to setup alias like: alias k='microk8s.kubectl'. Then you can simply do: k apply -f

-- Gopal
Source: StackOverflow

12/6/2019

The problem is that Windows node may only act as a worker node. You can only create a hybrid cluster and have Windows workloads running in Windows pods, talking to Linux workloads running in Linux pods.

Intro to Windows support in Kubernetes:

The Kubernetes control plane, including the master components, continues to run on Linux. There are no plans to have a Windows-only Kubernetes cluster.

Full list of limitations can be found in official docs

Control Plane limitations:

Windows is only supported as a worker node in the Kubernetes architecture and component matrix. This means that a Kubernetes cluster must always include Linux master nodes, zero or more Linux worker nodes, and zero or more Windows worker nodes.

Resource management and process isolation:

Linux cgroups are used as a pod boundary for resource controls in Linux. Containers are created within that boundary for network, process and file system isolation. The cgroups APIs can be used to gather cpu/io/memory stats. In contrast, Windows uses a Job object per container with a system namespace filter to contain all processes in a container and provide logical isolation from the host. There is no way to run a Windows container without the namespace filtering in place. This means that system privileges cannot be asserted in the context of the host, and thus privileged containers are not available on Windows. Containers cannot assume an identity from the host because the Security Account Manager (SAM) is separate.

-- VKR
Source: StackOverflow