In a Windows cluster provisioned with Rancher, the cluster must contain both Linux and Windows nodes. The Kubernetes controlplane can only run on Linux nodes, and the Windows nodes can only have the worker role. Windows nodes can only be used for deploying workloads.

Some other requirements for Windows clusters include:

  • You can only add Windows nodes to a cluster if Windows support is enabled when the cluster is created. Windows support cannot be enabled for existing clusters.
  • Kubernetes 1.15+ is required.
  • The Flannel network provider must be used.
  • Windows nodes must have 50 GB of disk space.

For the full list of requirements, see this section.

For a summary of Kubernetes features supported in Windows, see the Kubernetes documentation on or the guide for scheduling Windows containers in Kubernetes.

This guide covers the following topics:

Requirements for Windows Clusters

The general node requirements for networking, operating systems, and Docker are the same as the node requirements for a .

Our support for Windows Server and Windows containers match the Microsoft official lifecycle for LTSC (Long-Term Servicing Channel) and SAC (Semi-Annual Channel).

For the support lifecycle dates for Windows Server, see the Microsoft Documentation.

In order to add Windows worker nodes to a cluster, the node must be running one of the following Windows Server versions and the corresponding version of Docker Engine - Enterprise Edition (EE):

  • Nodes with Windows Server core version 1809 should use Docker EE-basic 18.09 or Docker EE-basic 19.03.

Kubernetes Version

Kubernetes v1.15+ is required.

Node Requirements

The hosts in the cluster need to have at least:

  • 2 core CPUs
  • 5 GB memory
  • 50 GB disk space

Rancher will not provision the node if the node does not meet these requirements.

Before provisioning a new cluster, be sure that you have already installed Rancher on a device that accepts inbound network traffic. This is required in order for the cluster nodes to communicate with Rancher. If you have not already installed Rancher, please refer to the before proceeding with this guide.

Rancher only supports Windows using Flannel as the network provider.

There are two network options: Host Gateway (L2bridge) and . The default option is VXLAN (Overlay) mode.

For Host Gateway (L2bridge) networking, it’s best to use the same Layer 2 network for all nodes. Otherwise, you need to configure the route rules for them. For details, refer to the documentation on configuring cloud-hosted VM routes. You will also need to if you are using Amazon EC2, Google GCE, or Azure VM.

If you are configuring DHCP options sets for an AWS virtual private cloud, note that in the option field, only one domain name can be specified. According to the DHCP options documentation:

Architecture Requirements

The Kubernetes cluster management nodes (etcd and controlplane) must be run on Linux nodes.

The worker nodes, which is where your workloads will be deployed on, will typically be Windows nodes, but there must be at least one worker node that is run on Linux in order to run the Rancher cluster agent, DNS, metrics server, and Ingress related containers.

Clusters won’t begin provisioning until all three node roles (worker, etcd and controlplane) are present.

We recommend the minimum three-node architecture listed in the table below, but you can always add additional Linux and Windows workers to scale up your cluster for redundancy:

Container Requirements

Windows requires that containers must be built on the same Windows Server version that they are being deployed on. Therefore, containers must be built on Windows Server core version 1809 or above. If you have existing containers built for an earlier Windows Server core version, they must be re-built on Windows Server core version 1809 or above.

If you set a Kubernetes cloud provider in your cluster, some additional steps are required. You might want to set a cloud provider if you want to want to leverage a cloud provider’s capabilities, for example, to automatically provision storage, load balancers, or other infrastructure for your cluster. Refer to for details on how to configure a cloud provider cluster of nodes that meet the prerequisites.

If you are using the GCE (Google Compute Engine) cloud provider, you must do the following:

  • Enable the GCE cloud provider in the cluster.yml by following these steps.
  • When provisioning the cluster in Rancher, choose Custom cloud provider as the cloud provider in the Rancher UI.

Tutorial: How to Create a Cluster with Windows Support

This tutorial describes how to create a Rancher-provisioned cluster with the three nodes in the recommended architecture.

When you provision a cluster with Rancher on existing nodes, you will add nodes to the cluster by installing the on each one. When you create or edit your cluster from the Rancher UI, you will see a Customize Node Run Command that you can run on each server to add it to your cluster.

To set up a cluster with support for Windows nodes and containers, you will need to complete the tasks below.

  1. Provision Hosts
  2. Add Nodes to the Cluster

1. Provision Hosts

To begin provisioning a cluster on existing nodes with Windows support, prepare your hosts.

Your hosts can be:

  • Cloud-hosted VMs
  • VMs from virtualization clusters
  • Bare-metal servers

You will provision three nodes:

  • One Linux node, which manages the Kubernetes control plane and stores your
  • A second Linux node, which will be another worker node
  • The Windows node, which will run your Windows containers as a worker node

If your nodes are hosted by a Cloud Provider and you want automation support such as loadbalancers or persistent storage devices, your nodes have additional configuration requirements. For details, see

2. Create the Cluster on Existing Nodes

The instructions for creating a Windows cluster on existing nodes are very similar to the general with some Windows-specific requirements.

  1. From the Global view, click on the Clusters tab and click Add Cluster.
  2. Click From existing nodes (Custom).
  3. Enter a name for your cluster in the Cluster Name text box.
  4. In the Kubernetes Version dropdown menu, select v1.15 or above.
  5. In the Network Provider field, select Flannel.
  6. In the Windows Support section, click Enable.
  7. Optional: After you enable Windows support, you will be able to choose the Flannel backend. There are two network options: Host Gateway (L2bridge) and . The default option is VXLAN (Overlay) mode.

3. Add Nodes to the Cluster

This section describes how to register your Linux and Worker nodes to your cluster. You will run a command on each node, which will install the Rancher agent and allow Rancher to manage each node.

Add Linux Master Node

In this section, we fill out a form on the Rancher UI to get a custom command to install the Rancher agent on the Linux master node. Then we will copy the command and run it on our Linux master node to register the node in the cluster.

The first node in your cluster should be a Linux host has both the Control Plane and etcd roles. At a minimum, both of these roles must be enabled for this node, and this node must be added to your cluster before you can add Windows hosts.

  1. In the Node Operating System section, click Linux.
  2. In the Node Role section, choose at least etcd and Control Plane. We recommend selecting all three.
  3. Optional: If you click Show advanced options, you can customize the settings for the Rancher agent and
  4. Copy the command displayed on the screen to your clipboard.
  5. SSH into your Linux host and run the command that you copied to your clipboard.
  6. When you are finished provisioning your Linux node(s), select Done.

Result:

Your cluster is created and assigned a state of Provisioning. Rancher is standing up your cluster.

You can access your cluster after its state is updated to Active.

Active clusters are assigned two Projects:

  • Default, containing the default namespace
  • System, containing the cattle-system, ingress-nginx, , and kube-system namespaces

It may take a few minutes for the node to be registered in your cluster.

Add Linux Worker Node

In this section, we run a command to register the Linux worker node to the cluster.

After the initial provisioning of your cluster, your cluster only has a single Linux host. Next, we add another Linux worker host, which will be used to support Rancher cluster agent, Metrics server, DNS and Ingress for your cluster.

  1. From the Global view, click Clusters.
  2. Go to the cluster that you created and click ⋮ > Edit.
  3. Scroll down to Node Operating System. Choose Linux.
  4. In the Customize Node Run Command section, go to the Node Options and select the Worker role.
  5. Copy the command displayed on screen to your clipboard.
  6. Log in to your Linux host using a remote Terminal connection. Run the command copied to your clipboard.
  7. From Rancher, click Save.

Result: The Worker role is installed on your Linux host, and the node registers with Rancher. It may take a few minutes for the node to be registered in your cluster.

In this section, we run a command to register the Windows worker node to the cluster.

You can add Windows hosts to the cluster by editing the cluster and choosing the Windows option.

  1. From the Global view, click Clusters.
  2. Go to the cluster that you created and click ⋮ > Edit.
  3. Scroll down to Node Operating System. Choose Windows. Note: You will see that the worker role is the only available role.
  4. Copy the command displayed on screen to your clipboard.
  5. Log in to your Windows host using your preferred tool, such as . Run the command copied to your clipboard in the Command Prompt (CMD).
  6. From Rancher, click Save.
  7. Optional: Repeat these instructions if you want to add more Windows nodes to your cluster.

Result: The Worker role is installed on your Windows host, and the node registers with Rancher. It may take a few minutes for the node to be registered in your cluster. You now have a Windows Kubernetes cluster.

Optional Next Steps

After creating your cluster, you can access it through the Rancher UI. As a best practice, we recommend setting up these alternate ways of accessing your cluster:

  • Access your cluster with the kubectl CLI: Follow to access clusters with kubectl on your workstation. In this case, you will be authenticated through the Rancher server’s authentication proxy, then Rancher will connect you to the downstream cluster. This method lets you manage the cluster without the Rancher UI.
  • Access your cluster with the kubectl CLI, using the authorized cluster endpoint: Follow these steps to access your cluster with kubectl directly, without authenticating through the Rancher server. We recommend setting up this alternative method to access your cluster so that in case you can’t connect to Rancher, you can still access the cluster.

Configuration for Storage Classes in Azure