注意:master和slave节点都需要执行相同操作。
1、停止相关服务
systemctl stop kubelet systemctl stop etcd systemctl stop docker
2、卸载k8s
kubeadm reset -f
3、删除k8s相关目录
modprobe -r ipip lsmod 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
4、卸载k8s相关程序
yum -y remove kube*
5、更新镜像
yum clean all yum -y update yum makecache标签:重置,etc,rf,yum,卸载,rm,k8s From: https://www.cnblogs.com/databank/p/17662690.html