-
Notifications
You must be signed in to change notification settings - Fork 268
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
Design Question: Drain Node vs Add Taints #123
Comments
NTH uses the standard cordon and drain mechanism from the kubectl command of the same name: aws-node-termination-handler/pkg/node/node.go Lines 93 to 103 in 14188ee
which ends up setting the Once NTH issues the cordon call (which sets https://github.com/aws/aws-node-termination-handler/blob/master/pkg/node/node.go#L135-L142 that it uses to ensure correct operation after a reboot of the worker node (if the worker is not a Spot instance of course) At the end of the day, the cluster admin can still use PodDisruptionBudgets to configure a Pod's general priority, but the termination or reboot notice is not something that a Pod can prevent from happening, which is why taints and tolerations aren't really appropriate here, IMHO. |
I see. I do see some enhancement with my described approach:
Anyway, I agree with you overall and most of the use cases should be able to resolve via PDB, so I'm closing this until someone thinks of a use case for this. |
Currently, most of the termination handler including this one, drains the node when termination notice is received.
TaintBasedEviction has been enabled since 1.13 (and TaintNodesByCondition since 1.12). Has anyone thought about using taints instead to approach this as below?
On receiving Termination Notice, taint the affected node with "termination-notice:NoSchedule" and "termination-notice:NoExecute".
In that case, any pods that do not have the toleration will automatically be evicted.
It will then give back the decision (and flexibility) to the cluster admin whether a pod can tolerate this or not.
This will provide more flexibility and scalability to say what combination of pods should or should not be evicted per the user's need.
Notes
The text was updated successfully, but these errors were encountered: