学无先后,达者为师

网站首页 编程语言 正文

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

作者:正在攀登的小蜗牛 更新时间: 2022-04-01 编程语言

现象:

 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节点上证书到目录即可

原文链接:https://blog.csdn.net/qq_21127151/article/details/120929170

栏目分类
最近更新