当前位置:   article > 正文

云原生 | k8s的mster-1,一直显示NotReady_failed while requesting a signed certificate from

failed while requesting a signed certificate from the master: cannot create
 一、mster节点一直显示NotReady 查看kubelet一直报错。
journalctl -u kubelet.service  -f

 以下错误

1.unable to load bootstrap kubeconfig: stat /etc/kubernetes/bootstrap-kubelet.conf: no such file or directory

bootstrap-kubelet.confk8s API的引导令牌(Bootstrap Tokens)认证相关的文件。该机制会根据证书生成token,然后将信息写在这个文件里边。

2.Failed while requesting a signed certificate from the master: cannot create certificate signing request

意思:请求签名证书时失败:无法创建证书签名请求

二、解决方法:
1.备份并重新生成证书
  1. # cd /etc/kubernetes/pki/
  2. # mkdir backup
  3. # mv apiserver.crt apiserver-etcd-client.key apiserver-kubelet-client.crt front-proxy-ca.crt front-proxy-client.crt front-proxy-client.key front-proxy-ca.key apiserver-kubelet-client.key apiserver.key apiserver-etcd-client.crt backup
  4. # kubeadm init phase certs all
2.备份并重新生成配置文件
  1. # cd /etc/kubernetes/
  2. # mkdir backup
  3. # mv admin.conf controller-manager.conf kubelet.conf,scheduler.conf backup
  4. # kubeadm init phase kubeconfig all
3.拷贝用户权限文件(一般不用)
# cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
4.查看集群节点状态

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Cpp五条/article/detail/565675
推荐阅读
相关标签
  

闽ICP备14008679号