天天看點

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

也可以通過這個辦法解決