The connection to the server localhost:8080 was refused - did you specify the right host or port?
k8s加入集群后记得按照提示运行以下命令
mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config
如果提示没有那些文件就从master1拷贝过去
ssh root@192.168.182.14 mkdir -p /etc/kubernetes/pki/etcd
scp /etc/kubernetes/pki/{ca.*,sa.*,front-proxy-ca.*} root@192.168.182.14:/etc/kubernetes/pki
scp /etc/kubernetes/pki/etcd/ca.* root@192.168.182.14:/etc/kubernetes/pki/etcd
scp /etc/kubernetes/admin.conf root@192.168.182.14:/etc/kubernetes
然后就可以使用查看集群了