解决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