报错The connection to the server localhost:8080 was refused - did you specify the right host or port?
原因环境变量
 kuebernetes master  没有与主机绑定  集群初始化没有绑定   此时设置主机的环境变量可以解决问题
解决方式
vim  /etc/profile 
export KUBECONFIG=/etc/kubernetes/admin.conf 
保存退出
执行 . /etc/profile 
posted on 2022-03-15 13:13  余多多  阅读(555)  评论(0)    收藏  举报