An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
Hello @Varma
In Azure Kubernetes Service (AKS), the cluster autoscaler is already built in. Unlike AWS EKS (where you must deploy the autoscaler yourself using Kubernetes YAML files), AKS manages the autoscaler for you. You don’t need to install or deploy anything manually with kubectl commands/helm charts.
You simply turn it on using the Azure CLI, and AKS handles the rest.
How to Enable It on a New Cluster
When creating a new AKS cluster, add these options:
az aks create \
--resource-group myResourceGroup \
--name myAKSCluster \
--node-count 1 \
--enable-cluster-autoscaler \
--min-count 1 \
--max-count 3 \
--generate-ssh-keys
What does the parameters mean in the above command:
-> The cluster will start with 1 node
-> It can automatically scale up to 3 nodes
-> AKS adds nodes when workloads need more resources
-> AKS removes nodes when they are no longer needed
How to Enable It on an Existing Cluster
If the cluster already exists, run:
az aks update \
--resource-group myResourceGroup \
--name myAKSCluster \
--enable-cluster-autoscaler \
--min-count 1 \
--max-count 3
This turns on autoscaling for the existing node pool with the limits you set.
Please note:
- You need Azure CLI version 2.0.76 or later
- Once autoscaler is enabled, do not manually scale the Virtual Machine Scale Set
- Always manage scaling through AKS to avoid conflicts in Azure Kubernetes Service (AKS), the cluster autoscaler is already built in.
References:
If there are any follow-up queries here or if you run into any failures while trying the above commands, just let me know in the "comments" and I'll be happy to help you out further.
If this helped to clarify your query, please don't forget to click on "Accept Answer" button.
Accept Answer button would look something like below: