I have a deployment (called moon2
) having 2 replicas (let's say moon2-pod1
and moon2-pod2
), deployed on Azure Kubeneretes (AKS) where the autocsaling feature is enabled (the min=2, the max=10 for nodes)
And when the cluster scales down, sometimes the workers deploying the pods of the deployment in question get killed, then the pods in question get deployed on other workers.
My question: How can i avoid the killing of pods moon2-pod1
and moon2-pod2
? ie. can i tell AKS: when you scale down, do not delete worker(s) having the 2 pods in question ? If the response is yes, how can i do that ? or is there another way ?
Thank you in advance for your help!