Open blueprismo opened 2 months ago
/area cluster-autoscaler
Anyone knows what is the latest version of cluster-autoscaler that it doesn't have this bug?
Anyone knows what is the latest version of cluster-autoscaler that it doesn't have this bug?
I don't know, but I could manage to "work around it" by setting a crazy high Pod Disruption Budget with MinAvailable.
@blueprismo have experienced a similar issue, we suspended the AZRebalance process (under ASG -> Advanced Configuration) on the ASG itself. We suspected this process was killing nodes to rebalance (outside of autoscaler control), causing behavior that seemed as though auto scaler wasn't respecting safe-to-evict annotation.
Which component are you using?: Cluster autoscaler
What version of the component are you using?: v1.27.1
Component version: v1.27.1 What k8s version are you using (
kubectl version
)?:kubectl version
OutputWhat environment is this in?: EKS - AWS
What did you expect to happen?: The Autoscaler sees the pod annotation
cluster-autoscaler.kubernetes.io/safe-to-evict: false
and respects it. Waiting for the pod to complete/finish before removing the node it is living on.What happened instead?: The scale-down does NOT respect the
cluster-autoscaler.kubernetes.io/safe-to-evict: false
annotation and deleted the node, therefore killing my very-important running pod.How to reproduce it (as minimally and precisely as possible): Have your autoscaler with these values at
v1.27
:Spawn your very important pod that shouldn't be killed:
Afterwards add some resource-locking deployment like this:
This will trigger a scale up of the pods. When the scale down happens, cross your fingers that the initial pod is not killed on the way. The annotation for the pod won't be respected at all.
Anything else we need to know?:
I have some hypothesis, like maybe the
Instance scale-in protection
from the ASG is disabled by default. And this may take precedence over any AutoScaler will.Another one is that the annotation should be on a deployment level, because my very important workload is running directly from a pod. (no rs/deployment on top of it).