I would like to know how does the AKS cluster autoscaler choses in which node pool to add a node in a multiple node pool environment
For instance, if I have a node pool tainted for a specific applications, will the autoscaler automatically detect the taint and only scale the node pool up if there are some pending pods which can be scheduled on the nodes ? Or will it scale a random node pool in the cluster ?
There is nothing about it on https://learn.microsoft.com/en-us/azure/aks/cluster-autoscaler.
Below are my test results:
Scenario1:
If there are multiple nodepools and if all those nodepools have got corresponding taints applied , then cluster autoscaler will scale only that particular nodepool for which the corresponding pods are in pending state which are specified with tolerations i.e. it will scale only that nodepool which matches with corresponding taints/tolerations
Scenario2:
If you have 3 nodepools , taint is applied only on one nodepool - once the corresponding nodepool is full , then the pending pods can go to other nodepools (on which taints were not applied) and there is a high possibility of auto-scaling randomly the other nodepools also!
Please Note: Only Taints & Tolerations will not guarantee of sticking the pods to corresponding nodepools. But If you apply Taints/Tolerations along with NodeAffinity that will make sure the pods will go and deploy only on corresponding nodepools !
All those conclusions are based upon the tests which I did locally in my AKS cluster!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With