How does the cluster autoscaler work on AKS?
AdvancedConceptAKS and ACR
Answer
Per node pool, between --min-count and --max-count. It scales out when pods are Pending because no node has room (based on requests, not usage), and scales in nodes whose pods can fit elsewhere after scale-down-unneeded-time (default 10 minutes).
Tune cluster-wide via the autoscaler profile:
az aks update -g rg -n aks --cluster-autoscaler-profile \
scan-interval=10s scale-down-unneeded-time=5m expander=least-waste \
balance-similar-node-groups=true
It works with HPA: HPA adds pods, pods go Pending, autoscaler adds nodes. Pods without requests break the whole chain.
More on AKS and ACR
What does Microsoft manage in AKS and what do you manage?BeginnerWhat is the difference between system and user node pools?BeginnerCompare the AKS networking options: kubenet, Azure CNI, Azure CNI Overlay, Azure CNI Powered by Cilium.AdvancedHow many IPs does an AKS subnet need with flat Azure CNI vs Overlay?AdvancedWhat are the AKS tiers (Free, Standard, Premium)?IntermediateHow do AKS Kubernetes version upgrades work?Intermediate