Manage node pools for an AKS cluster
Applies to: Azure Local, version 23H2
Note
For information about managing node pools in AKS on Azure Local 22H2, see Manage node pools.
In AKS enabled by Azure Arc, nodes of the same configuration are grouped together into node pools. These node pools contain the underlying VMs that run your applications. This article shows you how to create and manage node pools for an AKS cluster.
Create a Kubernetes cluster
To get started, create a Kubernetes cluster with a single node pool:
az aksarc create -n <cluster name> -g <resource group> --custom-location <custom location Id> --vnet-ids <vnet id> --generate-ssh-keys --load-balancer-count <load balancer count>
Add a node pool
You can add a node pool to an existing cluster using the az aksarc nodepool add
command. Make sure that the name of the node pool is not the same name as an existing node pool:
az aksarc nodepool add --name <node pool name> -g <resource group> --cluster-name <cluster name> --os-sku <Linux or Windows> --node-count <count> --node-vm-size <vm size>
Get configuration information for a node pool
To see the configuration of your node pools, use the az aksarc nodepool show
command:
az aksarc nodepool show --cluster-name <cluster name> -n <node pool name> -g <resource group>
Example output:
{
"availabilityZones": null,
"count": 1,
"extendedLocation": null,
"id":
"/subscriptions/<subscription>/resourceGroups/edgeci-registration-rr1s46r1710<resource
group>/providers/Microsoft.Kubernetes/connectedClusters/<cluster
name>/providers/Microsoft.HybridContainerService/provisionedClusterInstances/default/agentPools/<nodepoolname>",
"location": "westeurope",
"name": "nodepoolname",
"nodeImageVersion": null,
"osSku": "CBLMariner",
"osType": "Linux",
"provisioningState": "Succeeded",
"resourceGroup": "resourcegroup",
"status": {
"errorMessage": null,
"operationStatus": null,
"readyReplicas": [
{
"count": 1,
"vmSize": "Standard\_A4\_v2"
}
]
},
"systemData": {
…
},
"tags": null,
"type":
"microsoft.hybridcontainerservice/provisionedclusterinstances/agentpools",
"vmSize": "Standard\_A4\_v2"
}
Specify maximum pods deployed to a node pool
You can configure the maximum pods deployable to a node at cluster creation time, or when creating new node pools. If you don't specify maxPods
when you create node pools, your node pool is deployed with a default value of a maximum 110 pods:
az aksarc nodepool add --cluster-name <cluster name> -n <node pool name> -g <resource group> --max-pods 50 --yes
Scale a node pool
You can scale the number of nodes up or down in a node pool.
To scale the number of nodes in a node pool, use the az aksarc nodepool scale
command. The following example scales the number of
nodes to 2 in a node pool named nodepool1
:
az aksarc nodepool scale --cluster-name <cluster name> -n nodepool1 -g <resource group> --node-count 2 --yes
Delete a node pool
If you need to delete a node pool, use the az aksarc nodepool delete
command:
az aksarc nodepool delete --cluster-name <cluster name> -n <node pool name> -g <resource group> --yes