天天看点

kubeadm 安装完毕执行命令报The connection to the server localhost:8080 was refused

解决方案:

执行命令:

mkdir -p $HOME/.kube

sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config

sudo chown $(id -u):$(id -g) $HOME/.kube/config

即可解决。

另外

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

也可以通过这个办法解决