kubectl get node查看节点报错

1、报错

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")

kubectl get node查看节点报错

 

 2、执行了,还是报错

mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config

kubectl get node查看节点报错

 

 3、解决办法

执行export KUBECONFIG=/etc/kubernetes/admin.conf,问题解决

kubectl get node查看节点报错

 

上一篇:连表查询都用Left Join吧 以Windows服务方式运行.NET Core程序 HTTP和HTTPS的区别 ASP.NET SignalR介绍 asp.net—WebApi跨域 asp.net—自定义轻量级ORM C#之23中设计模式


下一篇:Kubrenetes入门