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
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/* |