Skip to content

Commit abe22ad

Browse files
Merge pull request #264007 from schaffererin/aksclusterconfigurationoptionsrewrite
cluster-configuration.md refactor
2 parents 714f160 + ec63b4c commit abe22ad

10 files changed

+426
-665
lines changed

.openpublishing.redirection.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3849,6 +3849,11 @@
38493849
"redirect_url": "/azure/reliability/reliability-guidance-overview",
38503850
"redirect_document_id": false
38513851
},
3852+
{
3853+
"source_path_from_root": "/articles/aks/cluster-configuration.md",
3854+
"redirect_url": "/azure/aks/concepts-clusters-workloads.md",
3855+
"redirect_document_id": false
3856+
},
38523857
{
38533858
"source_path_from_root": "/articles/orbital/overview-analytics.md",
38543859
"redirect_url": "/azure/orbital/overview",

articles/aks/TOC.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -240,9 +240,9 @@
240240
items:
241241
- name: Deploy a cluster in an Edge Zone
242242
href: edge-zones.md
243-
- name: Cluster configuration options
244-
href: cluster-configuration.md
245-
- name: Manually scale nodes in an AKS cluster
243+
- name: Deploy a cluster with a fully managed resource group
244+
href: node-resource-group-lockdown.md
245+
- name: Scale an AKS cluster
246246
href: scale-cluster.md
247247
- name: Stop and start an AKS cluster
248248
href: start-stop-cluster.md
@@ -749,6 +749,8 @@
749749
href: use-windows-hpc.md
750750
- name: Upgrade from Windows Server 2019 to 2022
751751
href: upgrade-windows-2019-2022.md
752+
- name: Use generation 2 VMs
753+
href: generation-2-vm-windows.md
752754
- name: Create Dockerfiles for Windows Server containers
753755
href: /virtualization/windowscontainers/manage-docker/manage-windows-dockerfile?context=/azure/aks/context/aks-context
754756
- name: Optimize Dockerfiles for Windows Server containers

articles/aks/cluster-configuration.md

Lines changed: 0 additions & 503 deletions
This file was deleted.

articles/aks/concepts-clusters-workloads.md

Lines changed: 149 additions & 125 deletions
Large diffs are not rendered by default.

articles/aks/create-node-pools.md

Lines changed: 44 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,15 @@ The following limitations apply when you create AKS clusters that support multip
4949
1. Create an Azure resource group using the [`az group create`][az-group-create] command.
5050

5151
```azurecli-interactive
52-
az group create --name myResourceGroup --location eastus
52+
az group create --name $RESOURCE_GROUP_NAME --location $LOCATION
5353
```
5454
5555
2. Create an AKS cluster with a single node pool using the [`az aks create`][az-aks-create] command.
5656
5757
```azurecli-interactive
5858
az aks create \
59-
--resource-group myResourceGroup \
60-
--name myAKSCluster \
59+
--resource-group $RESOURCE_GROUP_NAME \
60+
--name $CLUSTER_NAME \
6161
--vm-set-type VirtualMachineScaleSets \
6262
--node-count 2 \
6363
--generate-ssh-keys \
@@ -69,7 +69,7 @@ The following limitations apply when you create AKS clusters that support multip
6969
3. When the cluster is ready, get the cluster credentials using the [`az aks get-credentials`][az-aks-get-credentials] command.
7070
7171
```azurecli-interactive
72-
az aks get-credentials --resource-group myResourceGroup --name myAKSCluster
72+
az aks get-credentials --resource-group $RESOURCE_GROUP_NAME --name $CLUSTER_NAME
7373
```
7474
7575
## Add a node pool
@@ -80,16 +80,16 @@ The cluster created in the previous step has a single node pool. In this section
8080
8181
```azurecli-interactive
8282
az aks nodepool add \
83-
--resource-group myResourceGroup \
84-
--cluster-name myAKSCluster \
85-
--name mynodepool \
83+
--resource-group $RESOURCE_GROUP_NAME \
84+
--cluster-name $CLUSTER_NAME \
85+
--name $NODE_POOL_NAME \
8686
--node-count 3
8787
```
8888
8989
2. Check the status of your node pools using the [`az aks node pool list`][az-aks-nodepool-list] command and specify your resource group and cluster name.
9090
9191
```azurecli-interactive
92-
az aks nodepool list --resource-group myResourceGroup --cluster-name myAKSCluster
92+
az aks nodepool list --resource-group $RESOURCE_GROUP_NAME --cluster-name $CLUSTER_NAME
9393
```
9494
9595
The following example output shows *mynodepool* has been successfully created with three nodes. When the AKS cluster was created in the previous step, a default *nodepool1* was created with a node count of *2*.
@@ -134,9 +134,9 @@ The ARM64 processor provides low power compute for your Kubernetes workloads. To
134134
135135
```azurecli-interactive
136136
az aks nodepool add \
137-
--resource-group myResourceGroup \
138-
--cluster-name myAKSCluster \
139-
--name armpool \
137+
--resource-group $RESOURCE_GROUP_NAME \
138+
--cluster-name $CLUSTER_NAME \
139+
--name $ARM_NODE_POOL_NAME \
140140
--node-count 3 \
141141
--node-vm-size Standard_D2pds_v5
142142
```
@@ -151,9 +151,9 @@ The Azure Linux container host for AKS is an open-source Linux distribution avai
151151
152152
```azurecli-interactive
153153
az aks nodepool add \
154-
--resource-group myResourceGroup \
155-
--cluster-name myAKSCluster \
156-
--name azlinuxpool \
154+
--resource-group $RESOURCE_GROUP_NAME \
155+
--cluster-name $CLUSTER_NAME \
156+
--name $AZ_LINUX_NODE_POOL_NAME \
157157
--os-sku AzureLinux
158158
```
159159
@@ -186,11 +186,11 @@ A workload may require splitting cluster nodes into separate pools for logical i
186186
187187
```azurecli-interactive
188188
az aks nodepool add \
189-
--resource-group myResourceGroup \
190-
--cluster-name myAKSCluster \
191-
--name mynodepool \
189+
--resource-group $RESOURCE_GROUP_NAME \
190+
--cluster-name $CLUSTER_NAME \
191+
--name $NODE_POOL_NAME \
192192
--node-count 3 \
193-
--vnet-subnet-id <YOUR_SUBNET_RESOURCE_ID>
193+
--vnet-subnet-id $SUBNET_RESOURCE_ID
194194
```
195195
196196
## FIPS-enabled node pools
@@ -217,10 +217,10 @@ Beginning in Kubernetes version 1.20 and higher, you can specify `containerd` as
217217
218218
```azurecli-interactive
219219
az aks nodepool add \
220-
--resource-group myResourceGroup \
221-
--cluster-name myAKSCluster \
220+
--resource-group $RESOURCE_GROUP_NAME \
221+
--cluster-name $CLUSTER_NAME \
222222
--os-type Windows \
223-
--name npwcd \
223+
--name $CONTAINER_D_NODE_POOL_NAME \
224224
--node-vm-size Standard_D4s_v3 \
225225
--kubernetes-version 1.20.5 \
226226
--aks-custom-headers WindowsContainerRuntime=containerd \
@@ -233,9 +233,9 @@ Beginning in Kubernetes version 1.20 and higher, you can specify `containerd` as
233233
234234
```azurecli-interactive
235235
az aks nodepool upgrade \
236-
--resource-group myResourceGroup \
237-
--cluster-name myAKSCluster \
238-
--name npwd \
236+
--resource-group $RESOURCE_GROUP_NAME \
237+
--cluster-name $CLUSTER_NAME \
238+
--name $CONTAINER_D_NODE_POOL_NAME \
239239
--kubernetes-version 1.20.7 \
240240
--aks-custom-headers WindowsContainerRuntime=containerd
241241
```
@@ -246,12 +246,29 @@ Beginning in Kubernetes version 1.20 and higher, you can specify `containerd` as
246246
247247
```azurecli-interactive
248248
az aks nodepool upgrade \
249-
--resource-group myResourceGroup \
250-
--cluster-name myAKSCluster \
249+
--resource-group $RESOURCE_GROUP_NAME \
250+
--cluster-name $CLUSTER_NAME \
251251
--kubernetes-version 1.20.7 \
252252
--aks-custom-headers WindowsContainerRuntime=containerd
253253
```
254254
255+
## Node pools with Ephemeral OS disks
256+
257+
* Add a node pool that uses Ephemeral OS disks to an existing cluster using the [`az aks nodepool add`][az-aks-nodepool-add] command with the `--node-osdisk-type` flag set to `Ephemeral`.
258+
259+
> [!NOTE]
260+
>
261+
> * You can specify Ephemeral OS disks during cluster creation using the `--node-osdisk-type` flag with the [`az aks create`][az-aks-create] command.
262+
> * If you want to create node pools with network-attached OS disks, you can do so by specifying `--node-osdisk-type Managed`.
263+
>
264+
265+
```azurecli-interactive
266+
az aks nodepool add --name $EPHEMERAL_NODE_POOL_NAME --cluster-name $CLUSTER_NAME --resource-group $RESOURCE_GROUP_NAME -s Standard_DS3_v2 --node-osdisk-type Ephemeral
267+
```
268+
269+
> [!IMPORTANT]
270+
> With Ephemeral OS, you can deploy VMs and instance images up to the size of the VM cache. The default node OS disk configuration in AKS uses 128 GB, which means that you need a VM size that has a cache larger than 128 GB. The default Standard_DS2_v2 has a cache size of 86 GB, which isn't large enough. The Standard_DS3_v2 VM SKU has a cache size of 172 GB, which is large enough. You can also reduce the default size of the OS disk by using `--node-osdisk-size`, but keep in mind the minimum size for AKS images is 30 GB.
271+
255272
## Delete a node pool
256273
257274
If you no longer need a node pool, you can delete it and remove the underlying VM nodes.
@@ -262,7 +279,7 @@ If you no longer need a node pool, you can delete it and remove the underlying V
262279
* Delete a node pool using the [`az aks nodepool delete`][az-aks-nodepool-delete] command and specify the node pool name.
263280
264281
```azurecli-interactive
265-
az aks nodepool delete -g myResourceGroup --cluster-name myAKSCluster --name mynodepool --no-wait
282+
az aks nodepool delete --resource-group $RESOURCE_GROUP_NAME --cluster-name $CLUSTER_NAME --name $NODE_POOL_NAME --no-wait
266283
```
267284
268285
It takes a few minutes to delete the nodes and the node pool.
@@ -279,7 +296,6 @@ In this article, you learned how to create multiple node pools in an AKS cluster
279296
[az-aks-get-credentials]: /cli/azure/aks#az_aks_get_credentials
280297
[az-aks-create]: /cli/azure/aks#az_aks_create
281298
[az-aks-update]: /cli/azure/aks#az_aks_update
282-
[az-aks-delete]: /cli/azure/aks#az_aks_delete
283299
[az-aks-nodepool]: /cli/azure/aks/nodepool
284300
[az-aks-nodepool-add]: /cli/azure/aks/nodepool#az_aks_nodepool_add
285301
[az-aks-nodepool-list]: /cli/azure/aks/nodepool#az_aks_nodepool_list
Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
---
2+
title: Use generation 2 virtual machines on Windows in Azure Kubernetes Service (AKS)
3+
description: Learn how to use generation 2 virtual machines on Windows in Azure Kubernetes Service (AKS).
4+
ms.topic: article
5+
ms.custom: azure-kubernetes-service
6+
ms.date: 01/23/2024
7+
ms.author: schaffererin
8+
author: schaffererin
9+
---
10+
11+
# Use generation 2 virtual machines on Windows in Azure Kubernetes Service (AKS) (preview)
12+
13+
Azure supports [Generation 2 (Gen 2) virtual machines (VMs)](../virtual-machines/generation-2.md). Gen 2 VMs support key features not supported in Generation 1 (Gen 1) VMs, including increased memory, Intel Software Guard Extensions (Intel SGX), and virtualized persistent memory (vPMEM).
14+
15+
Gen 2 VMs use the new UEFI-based boot architecture rather than the BIOS-based architecture used by Gen 1 VMs. Only specific SKUs and sizes support Gen 2 VMs. Check the [list of supported sizes](../virtual-machines/generation-2.md#generation-2-vm-sizes) to see if your SKU supports or requires Gen 2.
16+
17+
Additionally, not all VM images support Gen 2 VMs. On AKS, Gen 2 VMs use the AKS Ubuntu 22.04 or 18.04 image or the AKS Windows Server 2022 image. These images support all Gen 2 SKUs and sizes.
18+
19+
[!INCLUDE [preview features callout](includes/preview/preview-callout.md)]
20+
21+
## Before you begin
22+
23+
Before you begin, you need the following resources installed and configured:
24+
25+
* The Azure CLI version 2.44.0 or later. Run `az --version` to find the current version. If you need to install or upgrade, see [Install Azure CLI][azure-cli-install].
26+
* The `aks-preview` extension version 0.5.126 or later.
27+
* The `AKSWindows2022Gen2Preview` feature flag registered on your subscription.
28+
* Generation 2 VMs are supported on Windows for Windows Server 2022 (WS2022) only.
29+
* Generation 2 VMs are default for Windows clusters running Kubernetes 1.25 or later.
30+
31+
### Install the `aks-preview` Azure CLI extension
32+
33+
* Install or update the aks-preview Azure CLI extension using the [`az extension add`][az-extension-add] or the [`az extension update`][az-extension-update] command.
34+
35+
```azurecli-interactive
36+
# Install the aks-preview extension
37+
az extension add --name aks-preview
38+
39+
# Update to the latest version of the aks-preview extension
40+
az extension update --name aks-preview
41+
```
42+
43+
### Register the `AKSWindows2022Gen2Preview` feature flag
44+
45+
1. Register the `AKSWindows2022Gen2Preview` feature flag using the [`az feature register`][az-feature-register] command.
46+
47+
```azurecli-interactive
48+
az feature register --namespace "Microsoft.ContainerService" --name "AKSWindows2022Gen2Preview"
49+
```
50+
51+
It takes a few minutes for the status to show *Registered*.
52+
53+
2. Verify the registration using the [`az feature show`][az-feature-show] command.
54+
55+
```azurecli-interactive
56+
az feature show --namespace "Microsoft.ContainerService" --name "AKSWindows2022Gen2Preview"
57+
```
58+
59+
3. When the status reflects *Registered*, refresh the registration of the `Microsoft.ContainerService` resource provider using the [`az provider register`][az-provider-register] command.
60+
61+
```azurecli-interactive
62+
az provider register --namespace "Microsoft.ContainerService"
63+
```
64+
65+
## Create a Windows node pool with a Generation 2 VM
66+
67+
1. Check available Generation 2 VM sizes using the [`az vm list`][az-vm-list] command.
68+
69+
```azurecli-interactive
70+
az vm list -skus --location <location> --size <vm-size> --output table
71+
```
72+
73+
2. Create a Windows node pool with a Generation 2 VM using the [`az aks nodepool add`][az-aks-nodepool-add] command.
74+
75+
```azurecli-interactive
76+
az aks nodepool add --resource-group <resource-group-name> --cluster-name <cluster-name> --name <node-pool-name> --os-type Windows --os-sku Windows2022
77+
```
78+
79+
3. Verify a successful node pool creation using the [`az aks nodepool show`][az-aks-nodepool-show] command and check that the `nodeImageVersion` contains `gen2` in the output.
80+
81+
```azurecli-interactive
82+
az aks nodepool show --resource-group <resource-group-name> --cluster-name <cluster-name> --name <node-pool-name>
83+
```
84+
85+
## Update a Windows node pool to a Generation 2 VM
86+
87+
1. Check available Generation 2 VM sizes using the [`az vm list`][az-vm-list] command.
88+
89+
```azurecli-interactive
90+
az vm list -skus --location <location> --size <vm-size> --output table
91+
```
92+
93+
2. Update a Windows node pool to a Generation 2 VM using the [`az aks nodepool update`][az-aks-nodepool-update] command.
94+
95+
```azurecli-interactive
96+
az aks nodepool update --resource-group <resource-group-name> --cluster-name <cluster-name> --name <node-pool-name> --os-type Windows --os-sku Windows2022
97+
```
98+
99+
3. Verify a successful node pool update using the [`az aks nodepool show`][az-aks-nodepool-show] command and check that the `nodeImageVersion` contains `gen2` in the output.
100+
101+
```azurecli-interactive
102+
az aks nodepool show --resource-group <resource-group-name> --cluster-name <cluster-name> --name <node-pool-name>
103+
```
104+
105+
## Next steps
106+
107+
To learn more about Generation 2 VMs, see [Support for Generation 2 VMs on Azure](../virtual-machines/generation-2.md).
108+
109+
<!-- LINKS -->
110+
[azure-cli-install]: /cli/azure/install-azure-cli
111+
[az-aks-nodepool-add]: /cli/azure/aks/nodepool#az_aks_nodepool_add
112+
[az-aks-nodepool-show]: /cli/azure/aks/nodepool#az_aks_nodepool_show
113+
[az-aks-nodepool-update]: /cli/azure/aks/nodepool#az_aks_nodepool_update
114+
[az-extension-add]: /cli/azure/extension#az_extension_add
115+
[az-extension-update]: /cli/azure/extension#az_extension_update
116+
[az-feature-register]: /cli/azure/feature#az_feature_register
117+
[az-feature-show]: /cli/azure/feature#az_feature_show
118+
[az-provider-register]: /cli/azure/provider#az_provider_register
119+
[az-vm-list]: /cli/azure/vm#az_vm_list

articles/aks/learn/quick-windows-container-deploy-cli.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ An [Azure resource group](../../azure-resource-manager/management/overview.md) i
5959
6060
In this section, we create an AKS cluster with the following configuration:
6161
62-
- The cluster is configured with two nodes to ensure it operates reliably. A [node](../concepts-clusters-workloads.md#nodes-and-node-pools) is an Azure virtual machine (VM) that runs the Kubernetes node components and container runtime.
62+
- The cluster is configured with two nodes to ensure it operates reliably. A [node](../concepts-clusters-workloads.md#nodes) is an Azure virtual machine (VM) that runs the Kubernetes node components and container runtime.
6363
- The `--windows-admin-password` and `--windows-admin-username` parameters set the administrator credentials for any Windows Server nodes on the cluster and must meet [Windows Server password requirements][windows-server-password].
6464
- The node pool uses `VirtualMachineScaleSets`.
6565
@@ -71,13 +71,13 @@ To create the AKS cluster with Azure CLI, follow these steps:
7171
echo "Please enter the username to use as administrator credentials for Windows Server nodes on your cluster: " && read WINDOWS_USERNAME
7272
```
7373
74-
1. Create a password for the administrator username you created in the previous step. The password must be a minimum of 14 characters and meet the [Windows Server password complexity requirements][windows-server-password].
74+
2. Create a password for the administrator username you created in the previous step. The password must be a minimum of 14 characters and meet the [Windows Server password complexity requirements][windows-server-password].
7575
7676
```azurecli
7777
echo "Please enter the password to use as administrator credentials for Windows Server nodes on your cluster: " && read WINDOWS_PASSWORD
7878
```
7979
80-
1. Create your cluster using the [az aks create][az-aks-create] command and specify the `--windows-admin-username` and `--windows-admin-password` parameters. The following example command creates a cluster using the value from *WINDOWS_USERNAME* you set in the previous command. Alternatively, you can provide a different username directly in the parameter instead of using *WINDOWS_USERNAME*.
80+
3. Create your cluster using the [az aks create][az-aks-create] command and specify the `--windows-admin-username` and `--windows-admin-password` parameters. The following example command creates a cluster using the value from *WINDOWS_USERNAME* you set in the previous command. Alternatively, you can provide a different username directly in the parameter instead of using *WINDOWS_USERNAME*.
8181
8282
```azurecli
8383
az aks create \

articles/aks/learn/quick-windows-container-deploy-powershell.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ ResourceId : /subscriptions/00000000-0000-0000-0000-000000000000/resource
5353

5454
In this section, we create an AKS cluster with the following configuration:
5555

56-
- The cluster is configured with two nodes to ensure it operates reliably. A [node](../concepts-clusters-workloads.md#nodes-and-node-pools) is an Azure virtual machine (VM) that runs the Kubernetes node components and container runtime.
56+
- The cluster is configured with two nodes to ensure it operates reliably. A [node](../concepts-clusters-workloads.md#nodes) is an Azure virtual machine (VM) that runs the Kubernetes node components and container runtime.
5757
- The `-WindowsProfileAdminUserName` and `-WindowsProfileAdminUserPassword` parameters set the administrator credentials for any Windows Server nodes on the cluster and must meet the [Windows Server password complexity requirements][windows-server-password].
5858
- The node pool uses `VirtualMachineScaleSets`.
5959

@@ -66,7 +66,7 @@ To create the AKS cluster with Azure PowerShell, follow these steps:
6666
-Message 'Please create the administrator credentials for your Windows Server containers'
6767
```
6868
69-
1. Create your cluster using the [New-AzAksCluster][new-azakscluster] cmdlet and specify the `WindowsProfileAdminUserName` and `WindowsProfileAdminUserPassword` parameters.
69+
2. Create your cluster using the [New-AzAksCluster][new-azakscluster] cmdlet and specify the `WindowsProfileAdminUserName` and `WindowsProfileAdminUserPassword` parameters.
7070
7171
```azurepowershell
7272
New-AzAksCluster -ResourceGroupName myResourceGroup `

0 commit comments

Comments
 (0)