因为某些原因,需要卸载kubernetes
集群,本文将分享完整卸载kubernetes
的方法。
默认是root
用户操作
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
| kubectl delete node --all
for service in kube-apiserver kube-controller-manager kubectl kubelet kube-proxy kube-scheduler; do systemctl stop $service done
kubeadm reset -f
rm -rf ~/.kube/
rm -rf /etc/kubernetes/
rm -rf /etc/systemd/system/kubelet.service.d
rm -rf /etc/systemd/system/kubelet.service
rm -rf /usr/bin/kube*
rm -rf /etc/cni
rm -rf /opt/cni
rm -rf /var/lib/etcd
rm -rf /var/etcd
apt clean all
apt remove kube*
|