编程语言
首页 > 编程语言> > kubectl get node查看节点报错

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

 

 2、执行了,还是报错

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

 

 3、解决办法

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

 

标签:node,kubectl,kubernetes,sudo,authority,报错,HOME,kube
来源: https://www.cnblogs.com/zgt-edu-cn/p/15638821.html