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.14 on Windows Server version 1809, users can take advantage of the following features in Kubernetes on Windows:

  • overlay networking: use Flannel in vxlan mode to configure a virtual overlay network
    • requires either Windows Server 2019 with KB4489899 installed or Windows Server vNext Insider Preview Build 18317+
    • requires Kubernetes v1.14 (or above) with WinOverlay feature gate enabled
    • requires Flannel v0.11.0 (or above)
  • 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 isolation with kernel-mode isolation for enhanced security. For more information, Windows container types.
    • requires Kubernetes v1.10 (or above) with HyperVContainer feature gate enabled.
  • storage plugins: use the FlexVolume storage plugin with SMB and iSCSI support for Windows containers.

Tip

If you want to deploy a cluster on Azure, the open source AKS-Engine tool makes this easy. To learn more, see our step-by-step walkthrough.

Prerequisites

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:

Subnet / Address range Description Default Value
Service Subnet A non-routable, purely virtual subnet that is used by pods to uniformally access services without caring about the network topology. It is translated to/from routable address space by kube-proxy running on the nodes. "10.96.0.0/12"
Cluster Subnet This is a global subnet that is used by all pods in the cluster. Each nodes is assigned a smaller /24 subnet from this for their pods to use. It must be large enough to accommodate all pods used in your cluster. To calculate minimum subnet size: (number of nodes) + (number of nodes * maximum pods per node that you configure)

Example for a 5 node cluster for 100 pods per node: (5) + (5 * 100) = 505.

"10.244.0.0/16"
Kubernetes DNS Service IP IP address of "kube-dns" service that will be used for DNS resolution & cluster service discovery. "10.96.0.10"

Note

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.

What you will accomplish

By the end of this guide, you will have:

Next steps

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: