Created
March 4, 2023 03:43
-
-
Save jvyden/dd0d158b92f0f562f0cdd7a82ec16d73 to your computer and use it in GitHub Desktop.
Kubelet systemd daemon override file for automatically draining node on shutdown
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Service] | |
ExecStartPost=/usr/bin/kubectl uncordon %H --kubeconfig /root/.kube/config | |
ExecStop=/usr/bin/kubectl drain %H --ignore-daemonsets --delete-emptydir-data --force --grace-period=30 --kubeconfig /root/.kube/config | |
TimeoutStopSec=120 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment