k8s报错处理

发布时间:2023年12月29日

解决failed to verify certificate: x509报错问题

[root@master1 home]# kubectl get nodes
Unable to connect to the server: tls: failed to verify certificate: x509: certificate signed by unknown authority (possibly because of “crypto/rsa: verification error” while trying to verify candidate authority certificate “kubernetes”)

处理:

[root@master1 ~]# rm -rf .kube/
[root@master1 ~]# sudo mkdir ~/.kube
[root@master1 ~]# sudo cp /etc/kubernetes/admin.conf ~/.kube/

[root@master1 ~]# cd ~/.kube
[root@master1 .kube]# sudo mv admin.conf config
[root@master1 .kube]# sudo service kubelet restart
Redirecting to /bin/systemctl restart kubelet.service

文章来源:https://blog.csdn.net/weixin_45432833/article/details/134676756
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。