Skip to content

Commit 6d519cf

Browse files
authored
Merge pull request #281977 from schaffererin/mixednodepoolpr-new
New PR for AKS doc for mixed SKU node pools (preview) feature
2 parents e267660 + c01103e commit 6d519cf

File tree

2 files changed

+192
-0
lines changed

2 files changed

+192
-0
lines changed

articles/aks/TOC.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,8 @@
328328
href: create-node-pools.md
329329
- name: Manage node pools
330330
href: manage-node-pools.md
331+
- name: Use mixed SKU node pools
332+
href: mixed-sku-node-pools.md
331333
- name: Reduce image pull time with Artifact Streaming on AKS
332334
href: artifact-streaming.md
333335
- name: Use generation 2 VMs

articles/aks/mixed-sku-node-pools.md

Lines changed: 190 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,190 @@
1+
---
2+
title: Used mixed SKU node pools in Azure Kubernetes Services (AKS)
3+
description: Learn about creating node pools with multiple VM types in an AKS cluster.
4+
ms.topic: article
5+
ms.custom: devx-track-azurecli
6+
ms.date: 07/26/2024
7+
ms.author: wilsondarko
8+
author: wdarko1
9+
#Customer intent: As a cluster operator or developer, I want to learn how to enable my cluster to create node pools with multiple VM types.
10+
---
11+
12+
# Use mixed SKU node pools (preview) in Azure Kubernetes Services (AKS)
13+
14+
When you deploy a workload onto Azure Kubernetes Services (AKS), each node pool typically can only contain one virtual machine (VM) type or SKU. Mixed SKU node pools allow you to add multiple [VM SKUs][vm-SKU] to a single node pool without losing performance, quality, or certain feature support. Mixed SKU node pools allow you to specify a family of SKUs without the need to maintain one node pool per SKU type, reducing the node pool footprint.
15+
16+
## Prerequisites
17+
18+
- You need an Azure subscription. If you don't have an Azure subscription, you can create a [free account](https://azure.microsoft.com/free).
19+
- Currently, the feature is in preview and you need to use API version >= 2023-10-02-preview, or install the az cli extension >= 2.61.0 version.
20+
- If using the [Azure CLI][install azure cli], register the `aks-preview` extension or update the version of existing `aks-preview` to minimum version 4.0.0b4.
21+
- The minimum minor Kubernetes version that supports this new node pool type is version 1.26.
22+
23+
### Install the aks-preview Azure CLI extension
24+
25+
[!INCLUDE [preview features callout](~/reusable-content/ce-skilling/azure/includes/aks/includes/preview/preview-callout.md)]
26+
27+
1. Install the aks-preview extension using the [`az extension add`][az extension add] command:
28+
29+
```azurecli-interactive
30+
az extension add --name aks-preview
31+
```
32+
33+
2. Update to the latest version of the aks-preview extension using the [`az extension update`][az extension update] command.
34+
35+
```azurecli-interactive
36+
az extension update --name aks-preview
37+
```
38+
39+
## Register the `VMsAgentPoolPreview` feature flag
40+
41+
1. Select the subscription where you want to enable the feature flag using the [`az account set`][az account set] command.
42+
43+
```azurecli-interactive
44+
az account set --subscription <subscription-name>
45+
```
46+
47+
2. Register the `VMsAgentPoolPreview` feature flag using the [`az feature registration create`][az feature registration create] command.
48+
49+
```azurecli-interactive
50+
az feature registration create --namespace Microsoft.ContainerService --name VMsAgentPoolPreview
51+
```
52+
53+
It takes a few minutes for the status to show *Registered*.
54+
55+
3. Verify the registration status using the [`az feature show`][az feature show] command.
56+
57+
```azurecli-interactive
58+
az feature show --namespace "Microsoft.ContainerService" --name "VMsAgentPoolPreview"
59+
```
60+
61+
4. When the status reflects *Registered*, refresh the registration of the *Microsoft.ContainerService* resource provider using the [`az provider register`][az provider register] command.
62+
63+
```azurecli-interactive
64+
az provider register --namespace "Microsoft.ContainerService"
65+
```
66+
67+
## Limitations
68+
69+
- [Cluster autoscaler][cluster autoscaler] isn't available.
70+
- [InifiniBand] isn't available.
71+
- Windows node pool isn't supported.
72+
- This feature isn't available in Azure portal. You can only manipulate or manage the pool using [Azure CLI][azure cli] or REST APIs.
73+
- [Node pool snapshot][node pool snapshot] isn't supported.
74+
- Certain preview features that work in the [Azure Virtual Machine Scale Sets][VMSS] node might not be supported with this mixed SKU node pool.
75+
- All VM sizes selected in a node pool need to be from a similar VM family. For example, you can't mix an N-Series VM size with a D-Series VM size in the same node pool.
76+
77+
## Create an AKS cluster with mixed SKU node pools
78+
79+
> [!NOTE]
80+
> Only *one* VM size is allowed in a scale profile, and the maximum limit is *five* VM scale profiles overall for a mixed SKU node pool.
81+
82+
- Create an AKS cluster with mixed SKU node pools using the [`az aks create`][az aks create] command with the `--vm-set-type` flag set to `"VirtualMachines"`.
83+
84+
The following example creates a cluster named *myAKSCluster* with a mixed SKU node pool containing two nodes in the *myResourceGroup*, generates SSH keys, sets the load balancer SKU to *standard*, and sets the Kubernetes version to *1.28.5*:
85+
86+
```azurecli-interactive
87+
az aks create \
88+
--resource-group myResourceGroup \
89+
--name myAKSCluster \
90+
--vm-set-type "VirtualMachines" \
91+
--node-count 2 \
92+
--generate-ssh-keys \
93+
--load-balancer-sku standard \
94+
--kubernetes-version 1.28.5
95+
```
96+
97+
## Add a mixed SKU node pool to an existing cluster
98+
99+
- Add a mixed SKU node pool to an existing cluster using the [`az aks nodepool add`][az aks nodepool add] command with the `--vm-set-type` flag set to `"Virtual Machines"`.
100+
101+
The following example creates a mixed SKU node pool named *myvmpool* to the *myAKSCluster* cluster with three nodes and a maximum VM SKU of *Standard_D4s_v3*:
102+
103+
```azurecli-interactive
104+
az aks nodepool add \
105+
--resource-group myResourceGroup \
106+
--cluster-name myAKSCluster \
107+
--name myvmpool \
108+
--vm-set-type "VirtualMachines" \
109+
--vm-sizes "Standard_D4s_v3" \
110+
--node-count 3
111+
```
112+
113+
## Add manual scale profile to a node pool
114+
115+
- Add a manual scale profile to a node pool using the [`az aks nodepool manual-scale add`][az aks nodepool manual-scale add] with the `--vm-sizes` flag set to `"Standard_D2s_v3"`.
116+
117+
The following example adds a manual scale profile to node pool *myvmpool* in cluster *myAKSCluster* in resource group *myResourceGroup* with two nodes with a VM SKU of *Standard_D2s_v3*:
118+
119+
```azurecli-interactive
120+
az aks nodepool manual-scale add \
121+
--resource-group myResourceGroup \
122+
--cluster-name myAKSCluster \
123+
--name myvmpool1 \
124+
--vm-sizes "Standard_D2s_v3" \
125+
--node-count 2
126+
```
127+
128+
## Update an existing manual scale profile
129+
130+
- Update an existing manual scale profile in a node pool using the [`az aks nodepool manual-scale update`][az aks nodepool manual-scale update] command with the `--vm-sizes` flag set to `"Standard_D2s_v3"`.
131+
132+
> [!NOTE]
133+
> Use the `--current-vm-sizes` Azure CLI flag to specify the size of the existing node pool that you want to update. You can update `--vm-sizes` and/or `--node-count`. When using other tools or REST APIs, you need to pass in a full `agentPoolProfiles.virtualMachinesProfile.scale` field when updating the node pool scale profile.
134+
135+
The following example updates a manual scale profile to the *myvmpool1* node pool in the *myAKSCluster* cluster in the *myResourceGroup* resource group with five nodes and changes the VM SKU from *Standard_D4s_v3* to *Standard_D8s_v3*:
136+
137+
```azurecli-interactive
138+
az aks nodepool manual-scale update \
139+
--resource-group myResourceGroup \
140+
--cluster-name myAKSCluster \
141+
--name myvmpool1 \
142+
--current-vm-sizes "Standard_D4s_v3" \
143+
--vm-sizes "Standard_D8s_v3" \
144+
--node-count 5
145+
```
146+
147+
## Delete a manual scale profile
148+
149+
- Delete an existing manual scale profile using the [`az aks nodepool manual-scale delete`][az aks nodepool manual-scale delete] command.
150+
151+
> [!NOTE]
152+
> Use the `--current-vm-sizes` Azure CLI flag to specify the size of the existing node pool that you want to delete. When using other tools or REST APIs, you need to pass in a full `agentPoolProfiles.virtualMachinesProfile.scale` field when updating the node pool scale profile.
153+
154+
The following example deletes the manual scale profile using the *Standard_D8s_v3* VM SKU in the *myvmpool1* node pool in the *myAKSCluster* cluster in the *myResourceGroup* resource group.
155+
156+
```azurecli-interactive
157+
az aks nodepool manual-scale delete \
158+
--resource-group myResourceGroup \
159+
--cluster-name myAKSCluster \
160+
--name myvmpool1 \
161+
--current-vm-sizes "Standard_D8s_v3"
162+
```
163+
164+
## Next steps
165+
166+
In this article, you learned how to use mixed SKU node pools in Azure Kubernetes Services (AKS). To learn more about node pools in AKS, see [Create node pools][create node pools].
167+
168+
<!-- EXTERNAL LINKS -->
169+
170+
<!-- INTERNAL LINKS -->
171+
[install azure cli]: /cli/azure/install-azure-cli#install-azure-cli
172+
[az provider register]: /cli/azure/provider#az-provider-register
173+
[az feature show]: /cli/azure/feature#az-feature-show
174+
[az extension add]: /cli/azure/extension#az-extention-add
175+
[az feature registration create]: /cli/azure/feature/registration#az-feature-registration-create
176+
[az aks get credentials]: /cli/azure/aks#az-aks-get-credentials
177+
[az aks create]: /cli/azure/aks#az-aks-create
178+
[az aks nodepool add]: /cli/azure/aks/nodepool#az-aks-nodepool-add
179+
[az aks nodepool manual-scale add]: /cli/azure/aks/nodepool/manual-scale#az-aks-nodepool-manual-scale-add
180+
[az aks nodepool manual-scale update]: /cli/azure/aks/nodepool/manual-scale#az-aks-nodepool-manual-scale-update
181+
[az aks nodepool manual-scale delete]: /cli/azure/aks/nodepool/manual-scale#az-aks-nodepool-manual-scale-delete
182+
[node pool snapshot]: node-pool-snapshot.md
183+
[cluster autoscaler]: cluster-autoscaler-overview.md
184+
[InifiniBand]: ../virtual-machines/extensions/enable-infiniband.md
185+
[vm-SKU]: ../virtual-machines/sizes/overview.md
186+
[VMSS]: ../virtual-machine-scale-sets/overview.md
187+
[azure cli]: /cli/azure/get-started-with-azure-cli
188+
[az extension update]: /cli/azure/extension#az-extension-update
189+
[az account set]: /cli/azure/account#az-account-set
190+
[create node pools]: create-node-pools.md

0 commit comments

Comments
 (0)