Skip to content
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

emptyDir volume with medium Memory prevents scale down #2048

Closed
coryflucas opened this issue May 20, 2019 · 3 comments
Closed

emptyDir volume with medium Memory prevents scale down #2048

coryflucas opened this issue May 20, 2019 · 3 comments

Comments

@coryflucas
Copy link

Pods with local storage are supposed to prevent scale down, but it appears that emptyDir volumes with medium set to Memory also count. Is this intentional? Given the doc warn that these volumes are backed by tmpfs and will be lost on Node reboot, it seems like these should be considered safe to remove.

I'd be happy to submit a PR if this would be an acceptable change.

@futurekill
Copy link

+1

@kevinsimper
Copy link

I was surprised by the same, the idea of giving a pod a tmpfs would in my mind make it safe to evict.

The line that checks it is right here:
https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/utils/drain/drain.go#L244

and is started here:
https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/utils/drain/drain.go#L197

But you can set the pods annotation (not on the deployment) to this:
"cluster-autoscaler.kubernetes.io/safe-to-evict": "true"

@aleksandra-malinowska
Copy link
Contributor

It's intentional. safe-to-evict annotation mentioned above is the recommended workaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants