Skip to content

Graceful Node shutdown Single Node Cluster #4319

Discussion options

You must be logged in to vote

Thank you for all the help, I finally figured out to configure it properly:

  1. Create a kubelet.config (it only overrides what you set) and add the graceful node settings of your choice (seems like not possible via simple CLI args):
# /data/rancher/kubelet.config
apiVersion: kubelet.config.k8s.io/v1beta1
kind: KubeletConfiguration
shutdownGracePeriod: 15s,
shutdownGracePeriodCriticalPods: 10s
  1. Reference the kubelet.config in the k3s systemd service:
--kubelet-arg="config=/data/rancher/kubelet.config"
  1. Optional: Cleanup Pods in Phase shutdown, by either a CronJob or by an additional systemd service.
# /etc/systemd/system/k3s-cleanup.service
[Unit]
Description=k3s-cleanup
StartLimitInter…

Replies: 2 comments 11 replies

Comment options

You must be logged in to vote
6 replies
@brandond
Comment options

@containerpope
Comment options

@brandond
Comment options

@imranrazakhan
Comment options

@brandond
Comment options

Comment options

You must be logged in to vote
5 replies
@ehlesp
Comment options

@containerpope
Comment options

@ehlesp
Comment options

@containerpope
Comment options

@ehlesp
Comment options

Answer selected by containerpope
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants