Kubernetes on Windows
This page serves as an overview for getting started with Kubernetes on Windows by joining Windows nodes to a Linux-based cluster. With the release of Kubernetes 1.12 on Windows Server version 1803 beta, users can take advantage of the latest features in Kubernetes on Windows:
- simplified network management: use Flannel in host-gateway mode for automatic route management between nodes
- scalability improvements: enjoy faster and more reliable container start-up times thanks to deviceless vNICs for Windows Server containers
- hyper-v isolation (alpha): orchestrate hyper-v containers with kernel-mode isolation for enhanced security (see Windows container types)
- storage plugins: use the FlexVolume storage plugin with SMB and iSCSI support for Windows containers
If you would like to deploy a cluster on Azure, the open source ACS-Engine tool makes this easy. A step by step walkthrough is available.
Plan IP addressing for your cluster
As Kubernetes clusters introduce new subnets for pods and services, it is important to ensure that none of them collide with any other existing networks in your environment. Here are all the address spaces that need to be freed up in order to deploy Kubernetes successfully:
There is another Docker network (NAT) that gets created by default when you install Docker. It is not needed to operate Kubernetes on Windows as we assign IPs from the cluster subnet instead.
Disable anti-spoofing protection
Please read this section carefully as it is required for anyone to successfully use VMs to deploy Kubernetes on Windows today.
Ensure MAC address spoofing and virtualization is enabled for the Windows container host VMs (guests). To achieve this, you should run the following as Administrator on the machine hosting the VMs (example given for Hyper-V):
Set-VMProcessor -VMName "<name>" -ExposeVirtualizationExtensions $true Get-VMNetworkAdapter -VMName "<name>" | Set-VMNetworkAdapter -MacAddressSpoofing On
If you are using a VMware-based product to meet your virtualization needs, please look into enabling promiscuous mode for the MAC spoofing requirement.
If you are deploying Kubernetes on Azure IaaS VMs yourself, please look into VMs that support nested virtualization for this requirement.
What you will accomplish
By the end of this guide, you will have:
In this section, we talked about important pre-requisites & assumptions needed to deploy Kubernetes on Windows successfully today. Continue to learn how to setup a Kubernetes master: