k8s 报错 -Unable to connect to the server: x509: certificate signed by unknown authority

执行一下命令,然后kubectl get nodes 试一下

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 nodes --insecure-skip-tls-verify 试一下

posted @ 2021-07-20 14:28  小清澈  阅读(907)  评论(0编辑  收藏  举报