|
| 1 | +--- |
| 2 | +title: Use Windows Annual Channel for Containers on Azure Kubernetes Service (AKS) |
| 3 | +description: Learn about Windows Annual Channel for Containers for Windows containers on Azure Kubernetes Service (AKS). |
| 4 | +ms.service: azure-kubernetes-service |
| 5 | +ms.custom: windows-related-content |
| 6 | +ms.author: allyford |
| 7 | +author: schaffererin |
| 8 | +ms.topic: how-to |
| 9 | +ms.date: 07/01/2024 |
| 10 | +--- |
| 11 | + |
| 12 | +# Use Windows Annual Channel for Containers on Azure Kubernetes Service (AKS) (Preview) |
| 13 | + |
| 14 | +AKS supports [Windows Server Annual Channel for Containers](https://techcommunity.microsoft.com/t5/windows-server-news-and-best/windows-server-annual-channel-for-containers/ba-p/3866248) in public preview. Each channel version is released annually and is supported for *two years*. This channel is beneficial if you require increased innovation cycles and portability. |
| 15 | + |
| 16 | +Windows Annual Channel versions are based on the Kubernetes version of your node pool. To upgrade from one Annual Channel version to the next, you can [upgrade to a Kubernetes version][upgrade-aks-cluster] that supports the next Annual Channel version. |
| 17 | + |
| 18 | +[!INCLUDE [preview features callout](~/reusable-content/ce-skilling/azure/includes/aks/includes/preview/preview-callout.md)] |
| 19 | + |
| 20 | +## Supported Annual Channel releases |
| 21 | + |
| 22 | +AKS releases support for new releases of Windows Server Annual Channel for Containers in alignment with Kubernetes versions. For the latest updates, see the [AKS release notes][release-notes]. The following table provides an estimated release schedule for upcoming Annual Channel releases: |
| 23 | + |
| 24 | +| K8s version | Annual Channel (host) version | Container image supported | End of support date | |
| 25 | +|--------------|-------------------|-------------------|-------------------| |
| 26 | +| 1.28 | 23H2 (preview only) | Windows Server 2022 | End of 1.30 support | |
| 27 | +| 1.31 | 24H2 | Windows Server 2022 & Windows Server 2025 | End of 1.34 support | |
| 28 | +| 1.35 | 25H2 | Windows Server 2025 | End of 1.38 support | |
| 29 | + |
| 30 | +## Windows Annual Channel vs. Long Term Servicing Channel Releases (LTSC) |
| 31 | + |
| 32 | +AKS supports Long Term Servicing Channel Releases (LTSC), including Windows Server 2022 and Windows Server 2019. These come from a different release channel than Windows Server Annual Channel for Containers. To view our current recommendations, see the [Windows best practices documentation][windows-best-practices]. |
| 33 | + |
| 34 | +> [!NOTE] |
| 35 | +> Windows Server 2019 will retire after Kubernetes version 1.32 reaches end of life, and Windows Server 2022 will retire after Kubernetes version 1.34 reaches end of life. For more information, see the [AKS release notes][release-notes]. |
| 36 | +
|
| 37 | +The following table compares Windows Annual Channel and Long Term Servicing Channel releases: |
| 38 | + |
| 39 | +| Channel | Support | Upgrades | |
| 40 | +|---------|---------|----------| |
| 41 | +| Long Term Servicing Channel (LTSC) | LTSC channels are released every three years and are supported for five years. This channel is recommended for customers using Long Term Support. | To upgrade from one release to the next, you need to migrate your node pools to a new OS SKU option and rebuild your container images with the new OS version. | |
| 42 | +| Annual Channel for Containers | Annual Channel releases occur annually and are supported for two years. | To upgrade to the latest release, you can upgrade the Kubernetes version of your node pool. | |
| 43 | + |
| 44 | +## Before you begin |
| 45 | + |
| 46 | +* You need the Azure CLI version 2.56.0 or later installed and configured to set `os-sku` to `WindowsAnnual` with the `az aks nodepool add` command. Run `az --version` to find the version. If you need to install or upgrade, see [Install Azure CLI][install-azure-cli]. |
| 47 | + |
| 48 | +### Limitations |
| 49 | + |
| 50 | +* Windows Annual Channel doesn't support Azure Network Policy Manager (NPM). |
| 51 | + |
| 52 | +### Install the `aks-preview` Azure CLI extension |
| 53 | + |
| 54 | +* Register or update the aks-preview extension using the [`az extension add`][az-extension-add] or [`az extension update`][az-extension-update] command. |
| 55 | + |
| 56 | + ```azurecli-interactive |
| 57 | + # Register the aks-preview extension |
| 58 | + az extension add --name aks-preview |
| 59 | + # Update the aks-preview extension |
| 60 | + az extension update --name aks-preview |
| 61 | + ``` |
| 62 | +
|
| 63 | +### Register the `AKSWindowsAnnualPreview` feature flag |
| 64 | +
|
| 65 | +1. Register the `AKSWindowsAnnualPreview` feature flag using the [`az feature register`][az-feature-register] command. |
| 66 | +
|
| 67 | + ```azurecli-interactive |
| 68 | + az feature register --namespace "Microsoft.ContainerService" --name "WindowsAnnualPreview" |
| 69 | + ``` |
| 70 | +
|
| 71 | + It takes a few minutes for the status to show *Registered*. |
| 72 | +
|
| 73 | +2. Verify the registration status using the [`az feature show`][az-feature-show] command. |
| 74 | +
|
| 75 | + ```azurecli-interactive |
| 76 | + az feature show --namespace "Microsoft.ContainerService" --name "AKSWindowsAnnualPreview" |
| 77 | + ``` |
| 78 | +
|
| 79 | +3. When the status reflects *Registered*, refresh the registration of the *Microsoft.ContainerService* resource provider using the [`az provider register`][az-provider-register] command. |
| 80 | +
|
| 81 | + ```azurecli-interactive |
| 82 | + az provider register --namespace Microsoft.ContainerService |
| 83 | + ``` |
| 84 | +
|
| 85 | +## Use Windows Annual Channel for Containers on AKS |
| 86 | +
|
| 87 | +To use Windows Annual Channel on AKS, specify the following parameters: |
| 88 | +
|
| 89 | +* `os-type` set to `Windows` |
| 90 | +* `os-sku` set to `WindowsAnnual` |
| 91 | +
|
| 92 | +Windows Annual Channel versions are based on the Kubernetes version of your node pool. To check which release you'll get based on the Kubernetes version of your node pool, see the [supported Annual Channel releases](#supported-annual-channel-releases). |
| 93 | +
|
| 94 | +### Create a new Windows Annual Channel node pool |
| 95 | +
|
| 96 | +#### [Azure CLI](#tab/azure-cli) |
| 97 | +
|
| 98 | +* Create a Windows Annual Channel node pool using the [`az aks nodepool add`][az-aks-nodepool-add] command. The following example creates a Windows Annual Channel node pool with the 23H2 release: |
| 99 | +
|
| 100 | + ```azurecli-interactive |
| 101 | + az aks nodepool add \ |
| 102 | + --resource-group $RESOURCE_GROUP_NAME \ |
| 103 | + --cluster-name $CLUSTER_NAME \ |
| 104 | + --os-type Windows \ |
| 105 | + --os-sku WindowsAnnual \ |
| 106 | + --kubernetes-version 1.29 |
| 107 | + --name $NODE_POOL_NAME \ |
| 108 | + --node-count 1 |
| 109 | + ``` |
| 110 | +
|
| 111 | + > [!NOTE] |
| 112 | + > If you don't specify the Kubernetes version during node pool creation, AKS uses the same Kubernetes version as your cluster. |
| 113 | +
|
| 114 | +#### [Azure PowerShell](#tab/azure-powershell) |
| 115 | +
|
| 116 | +* Create a Windows Annual Channel node pool using the [`New-AzAksNodePool`][new-azaksnodepool] cmdlet. |
| 117 | +
|
| 118 | + ```azurepowershell |
| 119 | + New-AzAksNodePool -ResourceGroupName $RESOURCE_GROUP_NAME ` |
| 120 | + -ClusterName $CLUSTER_NAME ` |
| 121 | + -VmSetType VirtualMachineScaleSets ` |
| 122 | + -OsType Windows ` |
| 123 | + -OsSKU WindowsAnnual ` |
| 124 | + -Name $NODE_POOL_NAME |
| 125 | + ``` |
| 126 | +
|
| 127 | +--- |
| 128 | +
|
| 129 | +### Verify Windows Annual Channel node pool creation |
| 130 | +
|
| 131 | +* Verify Windows Annual Channel node pool creation by checking the OS SKU of your node pool using `kubectl describe node` command. |
| 132 | +
|
| 133 | + ```bash |
| 134 | + kubectl describe node $NODE_POOL_NAME |
| 135 | + ``` |
| 136 | +
|
| 137 | + If you successfully created a Windows Annual Channel node pool, you should see the following output: |
| 138 | +
|
| 139 | + ```output |
| 140 | + Name: npwin |
| 141 | + Roles: agent |
| 142 | + Labels: agentpool=npwin |
| 143 | + ... |
| 144 | + kubernetes.azure.com/os=windows |
| 145 | + ... |
| 146 | + kubernetes.azure.com/node-image-version=AKSWindows-23H2-gen2 |
| 147 | + ... |
| 148 | + kubernetes.azure.com/os-sku=WindowsAnnual |
| 149 | + ``` |
| 150 | +
|
| 151 | +### Upgrade an existing node pool to Windows Annual Channel |
| 152 | +
|
| 153 | +You can upgrade an existing node pool from an LTSC release to Windows Annual Channel by following the guidance in [Upgrade the OS version for your Azure Kubernetes Service (AKS) Windows workloads][upgrade-windows-os]. |
| 154 | +
|
| 155 | +To upgrade from one Annual Channel version to the next, you can [upgrade to a Kubernetes version][upgrade-aks-cluster] that supports the next Annual Channel version. |
| 156 | +
|
| 157 | +## Next steps |
| 158 | +
|
| 159 | +To learn more about Windows Containers on AKS, see the following resources: |
| 160 | +
|
| 161 | +> [!div class="nextstepaction"] |
| 162 | +> [Windows best practices][windows-best-practices] |
| 163 | +> [Windows FAQ][windows-faq] |
| 164 | +
|
| 165 | +<!--- LINKS ---> |
| 166 | +[windows-best-practices]: ./windows-best-practices.md |
| 167 | +[windows-FAQ]: ./windows-faq.md |
| 168 | +[upgrade-aks-cluster]: ./upgrade-aks-cluster.md |
| 169 | +[upgrade-windows-os]: ./upgrade-windows-os.md |
| 170 | +[install-azure-cli]: /cli/azure/install-azure-cli |
| 171 | +[az-extension-add]: /cli/azure/azure-cli-extensions-overview#add-extensions |
| 172 | +[az-extension-update]: /cli/azure/azure-cli-extensions-overview#update-extensions |
| 173 | +[az-feature-register]: /cli/azure/feature#az_feature_register |
| 174 | +[az-feature-show]: /cli/azure/feature#az_feature_show |
| 175 | +[az-provider-register]: /cli/azure/provider#az_provider_register |
| 176 | +[az-aks-nodepool-add]: /cli/azure/aks/nodepool#az-aks-nodepool-add |
| 177 | +[new-azaksnodepool]: /powershell/module/az.aks/new-azaksnodepool |
| 178 | +[release-notes]: https://github.com/Azure/AKS/releases |
0 commit comments