-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cluster-autoscaler.kubernetes.io/safe-to-evict: false annotation not disabling eviction #5668
Comments
Seems as though the pod having local storage log message takes precedence over the safe-to-evict annotation log message |
Yes. CA checks for blocking local storage before autoscaler/cluster-autoscaler/utils/drain/drain.go Lines 222 to 226 in 5af3685
|
I think it will be a little hard to say why the node is getting removed without the logs. |
Can you show us the YAML of pod & deployment without sensitive information? |
I solved the problem by lowering the scale down threshold and by adding skip-nodes-with-local-storage: false which now shows the correct log message and functioning as expected |
If you set skip-nodes-with-local-storage as false, then the pod will be moved to another node by CA. |
@fkennedy1 did this work for you?
I am facing exactly this issue after changing the config. This seems like a bug to me? |
@msardana94 This did work for me. I however also updated the threshold for scaling down. For me all the workloads with storage are using the annotation |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close not-planned |
@k8s-triage-robot: Closing this issue, marking it as "Not Planned". In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Which component are you using?: cluster-autoscaler
What version of the component are you using?: v1.23.0/ helm chart - v9.15.0
Component version: v1.23.0
What k8s version are you using (
kubectl version
)?:kubectl version
OutputWhat environment is this in?: production
What did you expect to happen?: Using EKS. The pod would not be evicted due to this annotation being present in the spec.template portion of the k8s deployment. I checked the all the relevant pods and they have the annotation.
What happened instead?: The pod and node were evicted even with the cluster-autoscaler.kubernetes.io/safe-to-evict: "false" annotation
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
I checked the logs and did not see this message at all:
Fast evaluation: node xxxx.ec2.internal cannot be removed: pod annotated as not safe to evict present: xxxx.
I even increased the scale down threshold temporarily to try and see if above logs were present to no success
We also have 1 AZ per ASG (not managed node groups) so not sure if suspending AZRebalance would have an effect.
Relevant component configuration:
The text was updated successfully, but these errors were encountered: