k8s The connection to the server localhost:8080 was refused - did you specify the right host or port?

kubeadm 配置好 master 节点后,提示了:

To start using your cluster, you need to run (as a regular user):

sudo cp /etc/kubernetes/admin.conf $HOME/
sudo chown $(id -u):$(id -g) $HOME/admin.conf
export KUBECONFIG=$HOME/admin.conf

按照这个在 master 节点上操作后再使用 kubectl 。

posted @ 2019-03-10 17:27  gao88  阅读(1487)  评论(0编辑  收藏  举报