-
Notifications
You must be signed in to change notification settings - Fork 999
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
Karpenter doesn't remove empty nodes #1914
Comments
You can look at the initialized label to see if the nodes were every initialized per Karpenter (kubelet reporting as ready, any startup taints removed and all extended resources registered):
Since you are using the g4dn instance types, you will also need to run the NVidia device plugin DS which is responsible for registering the GPU extended resources. If not, Karpenter waits for the NVidia GPU resource indefinitely. |
Is the wait for NVidia GPU resource new? Because in the previous 0.10.0 version Karpenter did remove the empty nodes. |
Yes, this is new behavior. If this doesn't occur, we don't consider the node empty to allow it time to finish initializing. Keeping the node allows for detecting configuration issues like this one (a missing device plugin) instead of launching another node that would also fail. Feel free to re-open if you have any other questions or experience any other odd behavior with the snapshot. |
Is there a way to limit the time Karpenter keeps the nodes that aren't initialized? In my case, because of my miss configuration the nodes were up for over 24 hours, this configuration issue can be pretty costly if Karpenter keeps these nodes forever 😅 Thanks! |
This new behaviour is weird and hanging nodes especially on GPU nodes which are expensive. Currently no "work" pod utilizes nodes and according to provisioners , they should be deleted after 30 seconds , they should not wait for expiry time (which default one is more than a year). Karpenter should not depend on an external plugin for node cleanup (unless we specifically require it)
Above are just 2 examples, there are more nodes like this fail to be descheduled after a scale down. Although there is no request for a new node nodes with failedConsistencyCheck should be removed after a time
|
Version
Karpenter: using the snapshot image of commit 06bd428
Kubernetes: v1.19
Expected Behavior
Karpenter should remove empty nodes from cluster after
ttlSecondsAfterEmpty
Actual Behavior
Karpenter does not remove these empty nodes, only when rolling back to 0.10.0 it removed the empty nodes and respected
ttlSecondsAfterEmpty
.Steps to Reproduce the Problem
Scale a deployment so karpenter will add nodes
Scale deployment to 0 and notice that after
ttlSecondsAfterEmpty
the emtpy nodes are still in the cluster.Roll back to 0.10.0
Resource Specs and Logs
Provisioner spec:
the deployment we scaled to test karpenter:
Karpenter controller logs (snapshot image) when we experienced the bug:
No logs mentioning TTL or empty nodes. (waited over 15 minutes when the ttlSecondsAfterEmpty is 30 seconds)
When we rolled back to 0.10.0 these are the logs:
The text was updated successfully, but these errors were encountered: