首页 > 其他 > 详细

kubectl get pods The connection to the server localhost:8080 was refused - did you specif...

时间:2020-04-21 17:47:10      阅读:565      评论:0      收藏:0      [点我收藏+]
The connection to the server localhost:8080 was refused - did you specify the right host or port?

原因:kubectl命令需要使用kubernetes-admin来运行。

解决办法:

1.将主节点中的/etc/kubernetes/admin.conf文件拷贝到从节点相同目录下

2.配置环境变量
echo "export KUBECONFIG=/etc/kubernetes/admin.conf" >> ~/.bash_profile

   3.立即生效

source ~/.bash_profile

 



kubectl get pods The connection to the server localhost:8080 was refused - did you specif...

原文:https://www.cnblogs.com/peteremperor/p/12745004.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!