美文网首页Kubernetes
安装Kubernetes报错:kubernetes-dashbo

安装Kubernetes报错:kubernetes-dashbo

作者: 王勇1024 | 来源:发表于2019-03-22 19:14 被阅读0次

    查看pod日志

    $ sudo kubectl logs kubernetes-dashboard-6dccb458d5-x7xft --namespace=kube-system
    2019/03/22 10:16:18 Starting overwatch
    2019/03/22 10:16:18 Using apiserver-host location: http://10.136.157.23:8080
    2019/03/22 10:16:18 Skipping in-cluster config
    2019/03/22 10:16:18 Using random key for csrf signing
    2019/03/22 10:16:18 Error while initializing connection to Kubernetes apiserver. This most likely means that the cluster is misconfigured (e.g., it has invalid apiserver certificates or service account's configuration) or the --apiserver-host param points to a server that does not exist. Reason: Get http://10.136.157.23:8080/version: dial tcp 10.136.157.23:8080: connect: connection refused
    Refer to our FAQ and wiki pages for more information: https://github.com/kubernetes/dashboard/wiki/FAQ
    

    从日志上来看,是因为无法连接到 apiserver。
    原因是在安装 kubernetes-dashboard 时,解除了 kubernetes-dashboard.yml 文件中 --apiserver 的注释,并且配置了错误的 apiserver 地址,kubernetes-dashboard默认访问 https://localhost:6443

    解决方案

    1. 注释 --apiserver
    2. 卸载kubernetes-dashboard
    3. 重新安装kubernetes-dashboard

    相关文章

      网友评论

        本文标题:安装Kubernetes报错:kubernetes-dashbo

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