Skip to content

Commit 9b05179

Browse files
authored
Merge pull request #110352 from mlearned/mdl-1668656-mutable-system-pool
system pool
2 parents d242789 + 4ff11ad commit 9b05179

File tree

2 files changed

+179
-4
lines changed

2 files changed

+179
-4
lines changed

articles/aks/TOC.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,10 +140,14 @@
140140
href: cluster-autoscaler.md
141141
- name: Use Availability Zones
142142
href: availability-zones.md
143-
- name: Use multiple node pools
144-
href: use-multiple-node-pools.md
145-
- name: Use spot node pools (preview)
146-
href: spot-node-pool.md
143+
- name: Use node pools
144+
items:
145+
- name: Use multiple node pools
146+
href: use-multiple-node-pools.md
147+
- name: Use spot node pools (preview)
148+
href: spot-node-pool.md
149+
- name: Use system node pools
150+
href: use-system-pools.md
147151
- name: Deploy AKS with Terraform
148152
href: ../terraform/terraform-create-k8s-cluster-with-tf-and-aks.md
149153
maintainContext: true

articles/aks/use-system-pools.md

Lines changed: 171 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,171 @@
1+
---
2+
title: Use system node pools in Azure Kubernetes Service (AKS)
3+
description: Learn how to create and manage system node pools in Azure Kubernetes Service (AKS)
4+
services: container-service
5+
ms.topic: article
6+
ms.date: 04/06/2020
7+
8+
---
9+
10+
# Manage system node pools in Azure Kubernetes Service (AKS)
11+
12+
In Azure Kubernetes Service (AKS), nodes of the same configuration are grouped together into *node pools*. Node pools contain the underlying VMs that run your applications. System node pools and user node pools are two different node pool modes for your AKS clusters. System node pools host essential system services such as CoreDNS. User node pools are where you place your application-specific pods. Every AKS cluster must contain at least one system node pool with at least one node. If you run a single system node pool for your AKS cluster, we recommend you use at least three nodes for the node pool.
13+
14+
## Before you begin
15+
16+
* You need the Azure CLI version 2.3.1 or later installed and configured. Run `az --version` to find the version. If you need to install or upgrade, see [Install Azure CLI][install-azure-cli].
17+
18+
## Limitations
19+
20+
The following limitations apply when you create and manage AKS clusters that support system node pools.
21+
22+
* See [Quotas, virtual machine size restrictions, and region availability in Azure Kubernetes Service (AKS)][quotas-skus-regions].
23+
* The AKS cluster must be built with virtual machine scale sets as the VM type.
24+
* The name of a node pool may only contain lowercase alphanumeric characters and must begin with a lowercase letter. For Linux node pools, the length must be between 1 and 12 characters. For Windows node pools, the length must be between 1 and 6 characters.
25+
26+
## System and user node pools
27+
28+
System node pool nodes each have the label **kubernetes.azure.com/mode: system**. Every AKS cluster contains at least one system node pool. System node pools have the following restrictions:
29+
30+
* System pools osType must be Linux.
31+
* User node pools osType may be Linux or Windows.
32+
* System pools must contain at least one node, and user node pools may contain zero or more nodes.
33+
* System node pools require a VM SKU of at least 2 vCPUs and 4GB memory.
34+
* System node pools must support at least 30 pods as described by the [minimum and maximum value formula for pods][maximum-pods].
35+
* Spot node pools require user node pools.
36+
37+
You can do the following operations with node pools:
38+
39+
* Change a system node pool to be a user node pool, provided you have another system node pool to take its place in the AKS cluster.
40+
* Change a user node pool to be a system node pool.
41+
* Delete user node pools.
42+
* You can delete system node pools, provided you have another system node pool to take its place in the AKS cluster.
43+
* An AKS cluster may have multiple system node pools and requires at least one system node pool.
44+
45+
## Create a new AKS cluster with a system node pool
46+
47+
When you create a new AKS cluster, you automatically create a system node pool with a single node. The initial node pool defaults to a mode of type system. When you create new node pools with az aks nodepool add, those node pools are user node pools unless you explicitly specify the mode parameter.
48+
49+
The following example creates a resource group named *myResourceGroup* in the *eastus* region.
50+
51+
```azurecli-interactive
52+
az group create --name myResourceGroup --location eastus
53+
```
54+
55+
Use the [az aks create][az-aks-create] command to create an AKS cluster. The following example creates a cluster named *myAKSCluster* with one system pool containing one node. For your production workloads, ensure you are using system node pools with at least three nodes. This operation may take several minutes to complete.
56+
57+
```azurecli-interactive
58+
az aks create -g myResourceGroup --name myAKSCluster --node-count 1 --generate-ssh-keys
59+
```
60+
61+
## Add a system node pool to an existing AKS cluster
62+
63+
You can add one or more system node pools to existing AKS clusters. The following command adds a node pool of mode type system with a default count of three nodes.
64+
65+
```azurecli-interactive
66+
az aks nodepool add -g myResourceGroup --cluster-name myAKSCluster -n mynodepool --mode system
67+
```
68+
## Show details for your node pool
69+
70+
You can check the details of your node pool with the following command.
71+
72+
```azurecli-interactive
73+
az aks nodepool show -g myResourceGroup --cluster-name myAKSCluster -n mynodepool
74+
```
75+
76+
A mode of type **System** is defined for system node pools, and a mode of type **User** is defined for user node pools.
77+
78+
```output
79+
{
80+
"agentPoolType": "VirtualMachineScaleSets",
81+
"availabilityZones": null,
82+
"count": 3,
83+
"enableAutoScaling": null,
84+
"enableNodePublicIp": false,
85+
"id": "/subscriptions/666d66d8-1e43-4136-be25-f25bb5de5883/resourcegroups/myResourceGroup/providers/Microsoft.ContainerService/managedClusters/myAKSCluster/agentPools/mynodepool",
86+
"maxCount": null,
87+
"maxPods": 110,
88+
"minCount": null,
89+
"mode": "System",
90+
"name": "mynodepool",
91+
"nodeLabels": {},
92+
"nodeTaints": null,
93+
"orchestratorVersion": "1.15.10",
94+
"osDiskSizeGb": 100,
95+
"osType": "Linux",
96+
"provisioningState": "Succeeded",
97+
"resourceGroup": "myResourceGroup",
98+
"scaleSetEvictionPolicy": null,
99+
"scaleSetPriority": null,
100+
"spotMaxPrice": null,
101+
"tags": null,
102+
"type": "Microsoft.ContainerService/managedClusters/agentPools",
103+
"vmSize": "Standard_DS2_v2",
104+
"vnetSubnetId": null
105+
}
106+
```
107+
108+
## Update system and user node pools
109+
110+
You can change modes for both system and user node pools. You can change a system node pool to a user pool only if another system node pool already exists on the AKS cluster.
111+
112+
This command changes a system node pool to a user node pool.
113+
114+
```azurecli-interactive
115+
az aks nodepool update -g myResourceGroup --cluster-name myAKSCluster -n mynodepool --mode user
116+
```
117+
118+
This command changes a user node pool to a system node pool.
119+
120+
```azurecli-interactive
121+
az aks nodepool update -g myResourceGroup --cluster-name myAKSCluster -n mynodepool --mode system
122+
```
123+
124+
## Delete a system node pool
125+
126+
> [!Note]
127+
> To use system node pools on AKS clusters before API version 2020-03-02, add a new system node pool, then delete the original default node pool.
128+
129+
Previously you could not delete the system node pool, which was the initial default node pool in an AKS cluster. You now have the flexibility to delete any node pool from your clusters. Since AKS clusters require at least one system node pool, you must have at least two system node pools on your AKS cluster before you can delete one of them.
130+
131+
```azurecli-interactive
132+
az aks nodepool delete -g myResourceGroup --cluster-name myAKSCluster -n mynodepool
133+
```
134+
135+
## Next steps
136+
137+
In this article, you learned how to create and manage system node pools in an AKS cluster. For more information about how to use multiple node pools, see [use multiple node pools][use-multiple-node-pools].
138+
139+
<!-- EXTERNAL LINKS -->
140+
[kubernetes-drain]: https://kubernetes.io/docs/tasks/administer-cluster/safely-drain-node/
141+
[kubectl-get]: https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#get
142+
[kubectl-taint]: https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#taint
143+
[kubectl-describe]: https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#describe
144+
[kubernetes-labels]: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
145+
[kubernetes-label-syntax]: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#syntax-and-character-set
146+
147+
<!-- INTERNAL LINKS -->
148+
[aks-windows]: windows-container-cli.md
149+
[az-aks-get-credentials]: /cli/azure/aks#az-aks-get-credentials
150+
[az-aks-create]: /cli/azure/aks#az-aks-create
151+
[az-aks-nodepool-add]: /cli/azure/aks/nodepool?view=azure-cli-latest#az-aks-nodepool-add
152+
[az-aks-nodepool-list]: /cli/azure/aks/nodepool?view=azure-cli-latest#az-aks-nodepool-list
153+
[az-aks-nodepool-update]: /cli/azure/aks/nodepool?view=azure-cli-latest#az-aks-nodepool-update
154+
[az-aks-nodepool-upgrade]: /cli/azure/aks/nodepool?view=azure-cli-latest#az-aks-nodepool-upgrade
155+
[az-aks-nodepool-scale]: /cli/azure/aks/nodepool?view=azure-cli-latest#az-aks-nodepool-scale
156+
[az-aks-nodepool-delete]: /cli/azure/aks/nodepool?view=azure-cli-latest#az-aks-nodepool-delete
157+
[az-extension-add]: /cli/azure/extension#az-extension-add
158+
[az-extension-update]: /cli/azure/extension#az-extension-update
159+
[az-group-create]: /cli/azure/group#az-group-create
160+
[az-group-delete]: /cli/azure/group#az-group-delete
161+
[az-group-deployment-create]: /cli/azure/group/deployment#az-group-deployment-create
162+
[gpu-cluster]: gpu-cluster.md
163+
[install-azure-cli]: /cli/azure/install-azure-cli
164+
[operator-best-practices-advanced-scheduler]: operator-best-practices-advanced-scheduler.md
165+
[quotas-skus-regions]: quotas-skus-regions.md
166+
[supported-versions]: supported-kubernetes-versions.md
167+
[tag-limitation]: ../azure-resource-manager/resource-group-using-tags.md
168+
[taints-tolerations]: operator-best-practices-advanced-scheduler.md#provide-dedicated-nodes-using-taints-and-tolerations
169+
[vm-sizes]: ../virtual-machines/linux/sizes.md
170+
[use-multiple-node-pools]: use-multiple-node-pools.md
171+
[maximum-pods]: faq.md#why-cant-i-set-maxpods-below-30

0 commit comments

Comments
 (0)