k8s重新初始化集群

1、移除所有工作节点
kubectl delete node izwz9ac58lkokssyf8owagz
2、所有工作节点删除工作目录,并重置kubeadm
rm -rf /etc/kubernetes/*
kubeadm reset
3、Master节点删除工作目录,并重置kubeadm

rm -rf /etc/kubernetes/*
rm -rf ~/.kube/*
rm -rf /var/lib/etcd/*
rm -rf /var/lib/cni/
rm -fr /etc/cni/net.d

kubeadm reset -f
4、重新init kubernetes

kubeadm init \
   --apiserver-advertise-address=192.168.132.50 \
   --image-repository registry.aliyuncs.com/google_containers \
   --kubernetes-version v1.20.0 \
   --pod-network-cidr=10.244.0.0/16 

你可能感兴趣的:(kubernetes,kubernetes,docker,容器)