Kubernetes 版本是 1.24,container runtime 用的是 containerd,kubeadm reset 时卡在 Unmounting mounted directories in "/var/lib/kubelet"
,请问如何解决?
$ kubeadm reset
W0521 18:04:42.926790 1743 preflight.go:55] [reset] WARNING: Changes made to this host by 'kubeadm init' or 'kubeadm join' will be reverted.
[reset] Are you sure you want to proceed? [y/N]: y
[preflight] Running pre-flight checks
W0521 18:04:44.278287 1743 removeetcdmember.go:84] [reset] No kubeadm config, using etcd pod spec to get data directory
[reset] No etcd config found. Assuming external etcd
[reset] Please, manually reset etcd to prevent further issues
[reset] Stopping the kubelet service
[reset] Unmounting mounted directories in "/var/lib/kubelet"
添加 --v=5
参数后发现是卡在下面的地方
cleanupnode.go:91] [reset] Removing Kubernetes-managed containers
/etc/cni/net.d/ 中有一些配置文件
$ ls /etc/cni/net.d/
05-cilium.conf 10-calico.conflist.cilium_bak calico-kubeconfig
删除这些文件后重新 kubeadm reset,问题就解决了
rm /etc/cni/net.d/*