卸载k8s集群

清理运行到k8s群集中的pod

kubectl delete node --all

使用脚本停止所有k8s服务

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

yum clean all

yum remove kube*.x86_64

 

posted @ 2022-10-10 13:57  runzhao  阅读(65)  评论(0编辑  收藏  举报