Scale Azure Kubernetes Service (AKS) Cluster Nodes With Azure CLI

In this blog post, I will show you how to scale an Azure Kubernetes Service (AKS) cluster node counts using Azure CLI.

In the previous posts, I have shown you how to deploy an AKS cluster and how to deploy WordPress.

Check Current configuration

The first step in the scaling process is first to check how many nodes the cluster has and also the name of the agent node pool. To check the current node count and node pool name, I will run the following Azure CLI command.

az aks show --resource-group RESOURCEGROUP --name CLUSTERNAME --query agentPoolProfiles

The output is showing below. Count is 1 and the agent pool name is agentpool.


To scale my AKS cluster to two nodes I will run the following command. The scale-down process is the same.

az aks scale --resource-group RESOURCEGROUP --name CLUSTERNAME --node-count 2 --nodepool-name agentpool

You can also check the node count using the Kubectl command below. also, note that the new node will run the same Kubernetes version of the existing node.

kubectl get nodes