kubectl error: The connection to the server localhost:8080 was refused

did you run below commands after kubeadm init

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

 

 

ref: https://github.com/kubernetes/kubernetes/issues/44665

文章来自:http://www.cnblogs.com/pinganzi/p/6832297.html
© 2021 jiaocheng.bubufx.com  联系我们
ICP备案:鲁ICP备09046678号-3