Scaling AKS Node Pools
What you'll learn: How to manually and automatically scale node pools in Azure Kubernetes Service to match changing workload demands.
Why Scale Node Pools?
Your AKS cluster's capacity needs fluctuate. During business hours, you might need more compute power; at night, you can scale down to save costs. Think of node pools like hotel staff—you schedule more workers during peak check-in times and fewer during quiet periods.
Manual Scaling
You can manually adjust node pool size using Azure CLI:
az aks nodepool scale \
--resource-group myResourceGroup \
--cluster-name myAKSCluster \
--name mynodepool \
--node-count 5
This immediately adds or removes nodes to reach your target count. Manual scaling gives you direct control but requires constant monitoring and intervention.
Automatic Scaling (Cluster Autoscaler)
Enable the cluster autoscaler to let AKS automatically adjust node count based on pod scheduling needs:
az aks nodepool update \
--resource-group myResourceGroup \
--cluster-name myAKSCluster \
--name mynodepool \
--enable-cluster-autoscaler \
--min-count 1 \
--max-count 10
The autoscaler watches for:
- Scale up: Pods that can't be scheduled due to insufficient resources
- Scale down: Nodes that are underutilized for an extended period
You define minimum and maximum boundaries, and AKS handles the rest automatically. This balances cost efficiency with application availability.
Choosing Your Approach
Manual scaling works for predictable workloads where you know capacity needs in advance. Automatic scaling suits variable workloads—web applications with traffic spikes, batch processing jobs, or development environments.
Key Takeaway: AKS node pools support both manual scaling for direct control and cluster autoscaling for dynamic capacity adjustment, allowing you to optimize costs while meeting performance demands.