美文网首页Kubernetes
安装Kubernetes报错:The connection to

安装Kubernetes报错:The connection to

作者: 王勇1024 | 来源:发表于2019-03-21 14:55 被阅读0次
    $ kubectl get pods --all-namespaces
    The connection to the server localhost:8080 was refused - did you specify the right host or port?
    

    原因:
    kube-apiserver默认只启动安全访问接口6443,而不启动非安装访问接口8080

    解决方案:

    $ sudo vi /etc/kubernetes/manifests/kube-apiserver.yaml
    # 修改--insecure-port=8080
    --insecure-port=0
    

    重启kube-apiserver

    $ sudo docker ps |grep 'kube-apiserver'
    603d90351617        06924f18fe15                                  "kube-apiserver --..."   5 minutes ago       Up 5 minutes                            k8s_kube-apiserver_kube-apiserver-kube-node1_kube-system_6a57a51e24c908ce9bda1e57855173b0_7
    $ docker restart 603d90351617
    

    相关文章

      网友评论

        本文标题:安装Kubernetes报错:The connection to

        本文链接:https://www.haomeiwen.com/subject/kuoqvqtx.html