kubectl 命令执行报错:(Unable to connect to the server: x509: certificate signed by unknown authority )

现象:
kubectl get nodes执行报错:

kubectl get nodes
Unable to connect to the server: x509: certificate signed by unknown authority (possibly because of "crypto/rsa: verification error" while trying to verify candidate authority certificate "kubernetes")

问题:
/root/.kube/config证书认证错误,使用正确证书,可能是kubeadm reset证书未删除
解决办法
删除原来的证书及缓存文件
#rm -rf /root/.kube/*

拷贝master节点上证书到目录即可

kubectl 命令执行报错:(Unable to connect to the server: x509: certificate signed by unknown authority )最先出现在Python成神之路

版权声明:
作者:zhangchen
链接:https://www.techfm.club/p/4501.html
来源:TechFM
文章版权归作者所有,未经允许请勿转载。

THE END
分享
二维码
< <上一篇
下一篇>>