You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/aks/create-node-pools.md
+44-28Lines changed: 44 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,15 +49,15 @@ The following limitations apply when you create AKS clusters that support multip
49
49
1. Create an Azure resource group using the [`az group create`][az-group-create] command.
50
50
51
51
```azurecli-interactive
52
-
az group create --name myResourceGroup --location eastus
52
+
az group create --name $RESOURCE_GROUP_NAME --location $LOCATION
53
53
```
54
54
55
55
2. Create an AKS cluster with a single node pool using the [`az aks create`][az-aks-create] command.
56
56
57
57
```azurecli-interactive
58
58
az aks create \
59
-
--resource-group myResourceGroup \
60
-
--name myAKSCluster \
59
+
--resource-group $RESOURCE_GROUP_NAME \
60
+
--name $CLUSTER_NAME \
61
61
--vm-set-type VirtualMachineScaleSets \
62
62
--node-count 2 \
63
63
--generate-ssh-keys \
@@ -69,7 +69,7 @@ The following limitations apply when you create AKS clusters that support multip
69
69
3. When the cluster is ready, get the cluster credentials using the [`az aks get-credentials`][az-aks-get-credentials] command.
70
70
71
71
```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
73
73
```
74
74
75
75
## Add a node pool
@@ -80,16 +80,16 @@ The cluster created in the previous step has a single node pool. In this section
80
80
81
81
```azurecli-interactive
82
82
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 \
86
86
--node-count 3
87
87
```
88
88
89
89
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.
90
90
91
91
```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
93
93
```
94
94
95
95
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
134
134
135
135
```azurecli-interactive
136
136
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 \
140
140
--node-count 3 \
141
141
--node-vm-size Standard_D2pds_v5
142
142
```
@@ -151,9 +151,9 @@ The Azure Linux container host for AKS is an open-source Linux distribution avai
151
151
152
152
```azurecli-interactive
153
153
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 \
157
157
--os-sku AzureLinux
158
158
```
159
159
@@ -186,11 +186,11 @@ A workload may require splitting cluster nodes into separate pools for logical i
186
186
187
187
```azurecli-interactive
188
188
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 \
192
192
--node-count 3 \
193
-
--vnet-subnet-id <YOUR_SUBNET_RESOURCE_ID>
193
+
--vnet-subnet-id $SUBNET_RESOURCE_ID
194
194
```
195
195
196
196
## FIPS-enabled node pools
@@ -217,10 +217,10 @@ Beginning in Kubernetes version 1.20 and higher, you can specify `containerd` as
* 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
+
255
272
## Delete a node pool
256
273
257
274
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
262
279
* Delete a node pool using the [`az aks nodepool delete`][az-aks-nodepool-delete] command and specify the node pool name.
263
280
264
281
```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
266
283
```
267
284
268
285
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
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).
Copy file name to clipboardExpand all lines: articles/aks/learn/quick-windows-container-deploy-cli.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -59,7 +59,7 @@ An [Azure resource group](../../azure-resource-manager/management/overview.md) i
59
59
60
60
In this section, we create an AKS cluster with the following configuration:
61
61
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.
63
63
- 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].
64
64
- The node pool uses `VirtualMachineScaleSets`.
65
65
@@ -71,13 +71,13 @@ To create the AKS cluster with Azure CLI, follow these steps:
71
71
echo "Please enter the username to use as administrator credentials for Windows Server nodes on your cluster: " && read WINDOWS_USERNAME
72
72
```
73
73
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].
75
75
76
76
```azurecli
77
77
echo "Please enter the password to use as administrator credentials for Windows Server nodes on your cluster: " && read WINDOWS_PASSWORD
78
78
```
79
79
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*.
In this section, we create an AKS cluster with the following configuration:
55
55
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.
57
57
- 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].
58
58
- The node pool uses `VirtualMachineScaleSets`.
59
59
@@ -66,7 +66,7 @@ To create the AKS cluster with Azure PowerShell, follow these steps:
66
66
-Message 'Please create the administrator credentials for your Windows Server containers'
67
67
```
68
68
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.
0 commit comments