Oh, the agony and celebration of getting Windows nodes joined to a Kubernetes cluster. This article dives into some of the challenges I faced and their resolution in the quest to get scalable, self-healing windows containers running within a Kubernetes cluster.
Preparing the Master node
There are many how-to articles for prepping a Kubernetes cluster to accept Windows nodes. They seem to be all over the map in terms of preparation steps one performs prior to calling the final “kubectl join” command. Here was the magic combination that worked for our environment.
On the Master Node:
- Download the latest flannel CNI from: https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml
- Modify the net-conf.json section of the flannel manifest in order to set the backend type to “host-gw”. It should look as follows:
net-conf.json: { “Network”: “10.244.0.0/16”, “Backend”: { “Type”: “host-gw”}}
3. Apply the kube-flannel.yml:
kubectl apply -f kube-flannel.yml
4. Add Windows Flannel and Kube-Proxy DaemonSet for Windows Nodes
curl -L https://github.com/kubernetes-sigs/sig-windows-tools/releases/latest/download/kube-proxy.yml | sed…