首页 > 其他 > 详细

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

时间:2019-10-23 15:21:52      阅读:565      评论:0      收藏:0      [点我收藏+]

Kubernetes-kubectl命令出现错误

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

[root@docker001 yum.repos.d]# kubectl get pods --all-namespaces
The connection to the server localhost:8080 was refused - did you specify the right host or port?

[root@docker001 yum.repos.d]# ll /etc/kubernetes/admin.conf
-rw------- 1 root root 5450 Oct 23 14:10 /etc/kubernetes/admin.conf
[root@docker001 yum.repos.d]# echo "export KUBECONFIG=/etc/kubernetes/admin.conf" >> ~/.bash_profile

[root@docker001 yum.repos.d]# source ~/.bash_profile

[root@docker001 yum.repos.d]# source ~/.bash_profile
[root@docker001 yum.repos.d]# kubectl get pods --all-namespaces
NAMESPACE NAME READY STATUS RESTARTS AGE
kube-system coredns-5644d7b6d9-8vbs4 0/1 Pending 0 5m39s
kube-system coredns-5644d7b6d9-jc4zk 0/1 Pending 0 5m39s
kube-system etcd-docker001 1/1 Running 0 4m47s
kube-system kube-apiserver-docker001 1/1 Running 0 4m22s
kube-system kube-controller-manager-docker001 1/1 Running 0 4m42s
kube-system kube-proxy-bxhpn 1/1 Running 0 5m39s
kube-system kube-scheduler-docker001 1/1 Running 0 4m33s
[root@docker001 yum.repos.d]#

 

技术分享图片

 

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

原文:https://www.cnblogs.com/xuziyu/p/11726068.html

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