Beginning with v1.5, Kubernetes started to introduce support for Windows nodes in its alpha version, upgrading this support to beta with the release of v1.9. Some of the key features for Windows containers are include:
Pod-level support for Windows containers (isolation=process)
Kernel load balancing based on Virtual Filtering Platform (VFP) Hyper-v Switch Extension
Windows container management via Container Runtime Interface (CRI)
Support for the use of the kubeadm command to add Windows nodes to an existing cluster
Recommended use of Windows Server Version 1803+ and Docker Version 17.06+
Note:
Control plane services still run on Linux servers, with only Kubelet, Kube-proxy, Docker, and network plugin services running on Windows nodes.
Windows Server 1803 is recommended since it fixes issues with Windows container symlinks, allowing ServiceAccount and ConfigMap to function normally.
Downloads
You can download the released binary files for Windows servers from . For instance,
Alternatively, you can compile from Kubernetes source code:
go get -u k8s.io/kubernetes
cd $GOPATH/src/k8s.io/kubernetes
# Build the kubelet
KUBE_BUILD_PLATFORMS=windows/amd64 make WHAT=cmd/kubelet
# Build the kube-proxy
KUBE_BUILD_PLATFORMS=windows/amd64 make WHAT=cmd/kube-proxy
# You will find the output binaries under the folder _output/local/bin/windows/
Network Plugins
The following network plugins are supported in Windows Server (note that the network plugin on Windows nodes must be the same as on Linux nodes):
Flannel v0.10.0+
Calico v3.0.1+
L3 Routing Topology
Example configuration for the wincni network plugin:
Secrets and ConfigMaps can only be used as environmental variables
This is a known issue with versions 1709 and earlier and can be fixed by upgrading to version 1803.
Volume Support
Local, emptyDir, hostPath, AzureDisk, AzureFile, and flexvolume are currently the only types of volumes supported by Windows containers. It's important to note that the format for the Volume's path needs to be mountPath: "C:\\etc\\foo" or mountPath: "C:/etc/foo".
In Windows Server version 1709, you must use images with the 1709 tag, such as
microsoft/aspnet:4.7.1-windowsservercore-1709
microsoft/windowsservercore:1709
microsoft/iis:windowsservercore-1709
Likewise, for Windows Server version 1803, you must use images with the 1803 tag. For Windows Server 2016, you need to use images with the ltsc2016 tag, such as microsoft/windowsservercore:ltsc2016.
Setting CPU and Memory
Starting from v1.10, Kubernetes supports setting CPU and memory for Windows containers:
Starting from v1.10, containers with Hyper-V isolation are supported (Alpha). Before use, the kubelet needs to be configured to enable the HyperVContainer feature switch. Then you can specify a container for Hyper-V isolation using Annotation experimental.windows.kubernetes.io/isolation-type=hyperv: