Advertisement

The connection to the server localhost:8080 was refused, please confirm if you specified the correct host or port.

阅读量:

报错信息显示,与本地主机8080端口的服务器连接被拒绝 - 是否正确指定了主机或端口号?
解决办法:
echo "export KUBECONFIG=/etc/kubernetes/admin.conf" >> ~/.bash_profile
source ~/.bash_profile

复制代码
    [root@k8s1 ~]# kubectl apply -f kube-flannel.yml
    The connection to the server localhost:8080 was refused - did you specify the right host or port?
    [root@k8s1 ~]# cd /etc/kubernetes/
    [root@k8s1 kubernetes]# ls
    admin.conf  controller-manager.conf  kubelet.conf  manifests  pki  scheduler.conf
    [root@k8s1 kubernetes]# ll admin.conf
    -rw------- 1 root root 5635 Oct 16 11:55 admin.conf
    [root@k8s1 kubernetes]# ech

全部评论 (0)

还没有任何评论哟~