清理k8s集群小记分享

sudo systemctl stop {kube-apiserver.service,kube-controller-manager.service,kubelet.service,kube-scheduler.service,etcd,flanneld,docker}
sudo systemctl daemon-reload
sudo rm -rf /etc/kubernetes/*
sudo rm -rf /var/lib/{kubele,flannel,etcd}
sudo rm -rf /usr/bin/docker
sudo rm -rf ~/.kube/
sudo rm -rf /usr/local/bin/{cfssl,cfssl-certinfo,cfssljson,etcd,etcdctl,flanneld,kube-apiserver,kube-controller-manager,kubelet,kube-scheduler}
sudo rm -rf /lib/systemd/system/{kube-apiserver.service,kube-apiserver.service,kubelet.service,kube-scheduler.service,flanneld.service,etcd.service,docker.service}
sudo rm -rf ~/!(scope)
sudo iptables -F && sudo iptables -X && sudo iptables -F -t nat && sudo iptables -X -t nat
ip link del flannel.1
ip link del docker0

点赞

发表评论

电子邮件地址不会被公开。必填项已用 * 标注