-
Notifications
You must be signed in to change notification settings - Fork 958
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 should cordon a node once it expires #4613
Comments
We've considered this, or the variant where we add a PreferNoSchedule taint instead. @jonathan-innis @njtran, FYI. |
Related to kubernetes-sigs/karpenter#621 |
Thanks @ellistarn . I looked at kubernetes-sigs/karpenter#621. And similar issues like kubernetes-sigs/karpenter#622 and kubernetes-sigs/karpenter#623 . |
@njtran is currently working on changes in this space, so it probably makes sense to sit tight. Feel free to come discuss at working group, and thanks a ton for the offer to contribute! |
Closing this as a duplicate of kubernetes-sigs/karpenter#622. |
Description
Observed Behavior:
When a node expires (reaches the value defined in
ttlSecondsUntilExpired
) and the node has pods withdo-not-evict
annotation set, Karpenter doesn't cordon the node causing new pods to keep being scheduled onto the expired node. This causes the problem that such nodes can never be terminated because there are new pods continuously allocated to this node.Expected Behavior:
Karpenter should either cordon or taint the nodes once they expire.
Proposed fix:
Taint the node with
karpenter.sh/nodeExpired=true:NoSchedule
, only pods that tolerate this taint can be scheduled onto an expired node. I understand there is some concern about utilization, when a node is not considered deprovisionable, we can allow some pods allocated to it. However, I think it is reasonable to limit what kind of pods can be scheduled to such expired nodes. We rely heavily on the node "expiration" feature to roll out AMI versions, this helps us to catch up with the latest node runtime automatically. Without this, the expired nodes can potentially stay there forever.Reproduction Steps (Please include YAML):
ttlSecondsUntilExpired
to a small value, e.g 10mdo-not-evict=true
annotationVersions:
kubectl version
): 1.24The text was updated successfully, but these errors were encountered: