Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
For Kubernetes version 1.20 and higher, you can specify containerd as the container runtime for Windows Server 2019 node pools. Starting with Kubernetes 1.23, containerd is the default and only container runtime for Windows.
In this article, you learn how to create Windows Server node pools with containerd in Azure Kubernetes Service (AKS).
Prerequisites
- Azure CLI installed and configured. Find the version using the
az versioncommand. If you need to install or upgrade, see Install Azure CLI. - An existing AKS cluster with a system node pool. If you need to create one, see Create an AKS cluster with a single node pool.
Limitations and considerations
When using Windows Server node pools with containerd, keep the following limitations and considerations in mind:
- Both the control plane and Windows Server 2019 node pools must use Kubernetes version 1.20 or greater.
- When you create or update a node pool to run Windows Server containers, the default value for
--node-vm-sizeisStandard_D2s_v3, which was the minimum recommended size for Windows Server 2019 node pools up to Kubernetes version 1.20. The minimum recommended size for Windows Server 2019 node pools usingcontainerdisStandard_D4s_v3. When setting the--node-vm-sizeparameter, check the list of restricted virtual machine (VM) sizes. - We recommend using taints or labels with your Windows Server 2019 node pools running
containerdand tolerations or node selectors with your deployments to guarantee your workloads are scheduled correctly.
Add a Windows Server node pool with containerd
Add a Windows Server node pool with
containerdinto your existing cluster using the [az aks nodepool add][az-aks-nodepool-add].Note
If you don't specify the
WindowsContainerRuntime=containerdcustom header, the node pool still usescontainerdas the container runtime by default.az aks nodepool add \ --resource-group $RESOURCE_GROUP \ --cluster-name $CLUSTER_NAME \ --os-type Windows \ --name $CONTAINER_D_NODE_POOL_NAME \ --node-vm-size Standard_D4s_v3 \ --kubernetes-version 1.20.5 \ --aks-custom-headers WindowsContainerRuntime=containerd \ --node-count 1
Upgrade an existing Windows Server node pool to containerd
Upgrade a specific node pool from Docker to
containerdusing the [az aks nodepool upgrade][az-aks-nodepool-upgrade] command.export CONTAINER_D_NODE_POOL_NAME="mywindowsnodepool" az aks nodepool upgrade \ --resource-group $RESOURCE_GROUP \ --cluster-name $CLUSTER_NAME \ --name $CONTAINER_D_NODE_POOL_NAME \ --kubernetes-version 1.20.7 \ --aks-custom-headers WindowsContainerRuntime=containerd
Upgrade all existing Windows Server node pools to containerd
Upgrade all node pools from Docker to
containerdusing the [az aks nodepool upgrade][az-aks-nodepool-upgrade] command.az aks nodepool upgrade \ --resource-group $RESOURCE_GROUP \ --cluster-name $CLUSTER_NAME \ --kubernetes-version 1.20.7 \ --aks-custom-headers WindowsContainerRuntime=containerd
Next steps
For more information about node pools in AKS, see Manage node pools for a cluster in Azure Kubernetes Service (AKS).