Drain node from K3S
How to safely drain and delete a node from a K3S Kubernetes cluster using kubectl.
Drain node from K3S
Remove a node from K3S
To safely remove a node, first drain it to evict all running pods (ignoring DaemonSets and deleting local data), then delete the node object from the cluster. This ensures workloads are rescheduled to other nodes before the node is removed.
1
2
kubectl drain k3s-ubuntu-18-04 --ignore-daemonsets --delete-local-data
kubectl delete node k3s-ubuntu-18-04
This post is licensed under CC BY 4.0 by the author.