Skip to content

Instantly share code, notes, and snippets.

@Jivvon
Jivvon / reset-k8s-node.sh
Created February 17, 2022 06:32 — forked from JhoLee/reset-k8s-node.sh
Reset K8S Node
echo -n "Really want to reset this node? (y/N): "
read -r check
if [[ "$check" = "y" ]]; then
echo "[INFO] Reset kubeadm"
kubeadm reset -f
echo "[INFO] Stop kubelet & docker service"
systemctl stop kubelet docker docker.socket
echo "[INFO] Remove K8S files"
rm -rvf /etc/kubernetes/*