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
 

Logo

K8S/Kubernetes社区为您提供最前沿的新闻资讯和知识内容

更多推荐