首页 新闻 搜索 专区 学院

如何强制重置 k8s control-plane 服务器

0
悬赏园豆:30 [已解决问题] 解决于 2022-05-20 15:18

运行 kubeadm reset 命令却试图读取集群信息,但我想强制重置这台服务器,请问如何实现?

$ 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'
k8s
问题补充:

kubeadm reset phase cleanup-node 命令也是同样的问题

dudu的主页 dudu | 高人七级 | 园豆:36444
提问于:2022-05-19 10:27
< >
分享
最佳答案
1

通过 kubeadm reset hangs 知道了原因,需要等获取 ConfigMap 的请求超时

$ 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'
W0519 14:29:41.537817   11119 reset.go:103] [reset] Unable to fetch the kubeadm-config ConfigMap from cluster: failed to get config map: Get "https://k8s-api:6443/api/v1/namespaces/kube-system/configmaps/kubeadm-config?timeout=10s": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
W0519 14:29:41.538034   11119 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]:
dudu | 高人七级 |园豆:36444 | 2022-05-19 14:34
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册