kubeadm reset报错原因
因为是在本地测试,挂载卷用的本地搭建的nfs服务,主机地址配置dhcp,第二天服务器ip地址自动更改导致k8s测试集群失效,需要重置单master的k8s,kubeadm reset报错。产生原因,启动的sonarqube服务挂载卷依旧在挂载使用,但是k8s不可用kubectl命令删除无效,需要进一步判断。
·
背景:
因为是在本地测试,挂载卷用的本地搭建的nfs服务,主机地址配置dhcp,第二天服务器ip地址自动更改导致k8s测试集群失效,需要重置单master的k8s,kubeadm reset报错
[root@master k8s]# kubeadm reset
[reset] Reading configuration from the cluster...
[reset] FYI: You can look at this config file with 'kubectl -n kube-system get cm kubeadm-config -o yaml'
W0619 10:47:23.556038 13352 reset.go:101] [reset] Unable to fetch the kubeadm-config ConfigMap from cluster: failed to get config map: Get "https://172.17.203.139:6443/api/v1/namespaces/kube-system/configmaps/kubeadm-config?timeout=10s": dial tcp 172.17.203.139:6443: connect: no route to host
[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
W0619 10:53:26.356654 13352 removeetcdmember.go:80] [reset] No kubeadm config, using etcd pod spec to get data directory
[reset] Stopping the kubelet service
[reset] Unmounting mounted directories in "/var/lib/kubelet"
W0619 10:53:26.422655 13352 unmount_linux.go:49] [reset] Failed to unmount mounted directory in /var/lib/kubelet/: /var/lib/kubelet/pods/f84e3e30-8b10-4c84-9f3b-af3690ad291b/volumes/kubernetes.io~nfs/nfs-client-root
W0619 10:53:26.453275 13352 unmount_linux.go:49] [reset] Failed to unmount mounted directory in /var/lib/kubelet/: /var/lib/kubelet/pods/8e87f4de-7ccc-48cb-9cd2-25776fdc1c2a/volumes/kubernetes.io~nfs/pvc-212c8ad0-c482-44e8-90fe-2239d4e22d7e
产生原因,启动的sonarqube服务挂载卷依旧在挂载使用,但是k8s不可用kubectl命令删除无效,需要进一步判断
........
更多推荐
已为社区贡献2条内容
所有评论(0)