【问题标题】:kubernetes dashboard not able to launchKubernetes 仪表板无法启动
【发布时间】:2017-11-04 19:56:57
【问题描述】:

在 Ubuntu 16.04.03(GCP 实例)上安装了 kubernetes 主节点。一切顺利,但无法启动仪表板。我确实打开了防火墙端口 8001 实例子网。新的/第一次安装,所以我可能会遗漏一些东西,请告知。运行 kubectl proxy 后,我试图通过实例的外部 ip 访问仪表板,例如:http://35.196.xx.xx:8001/ui

la@kube-master:~$ kubectl get pods -n kube-system
NAME                                  READY     STATUS    RESTARTS   AGE
etcd-kube-master                      1/1       Running   0          17m
kube-apiserver-kube-master            1/1       Running   0          17m
kube-controller-manager-kube-master   1/1       Running   0          17m
kube-dns-545bc4bfd4-knw2b             3/3       Running   0          26m
kube-flannel-ds-bpm8c                 1/1       Running   0          17m
kube-proxy-k649v                      1/1       Running   0          26m
kube-scheduler-kube-master            1/1       Running   0          17m

la@kube-master:~$ kubectl cluster-info
Kubernetes master is running at https://10.142.0.2:6443
KubeDNS is running at https://10.142.0.2:6443/api/v1/namespaces/kube-system/services/kube-dns
/proxy

la@kube-master:~$ kubectl get services
NAME         TYPE        CLUSTER-IP   EXTERNAL-IP   PORT(S)   AGE
kubernetes   ClusterIP   10.96.0.1    <none>        443/TCP   29m

提前谢谢你。

【问题讨论】:

    标签: git docker kubernetes gcp


    【解决方案1】:

    这是一个add-on that you need to install。有些安装方法会自动添加,但您选择的方法似乎没有。

    要部署仪表板,请执行以下命令:

    $ kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard.yaml
    

    要开始使用仪表板,请运行以下命令:

    $ kubectl proxy
    

    仪表板现在可通过http://localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/ 获得。

    如果您在 Google Cloud 上运行,为什么不使用 GKE?它更容易部署和管理。它甚至带有built-in dashboard

    【讨论】:

    • yaa GCE 在那里,但想在标准机器上试用。我部署了仪表板 cmd:kubectl apply -f raw.githubusercontent.com/kubernetes/dashboard/master/src/…。并使用 diff 端口运行代理,但仍然在云 CLI 上预览仍然无法正常工作。 la@kube-master:~$ kubectl proxy --port=8080 开始服务于 127.0.0.1:8080
    • 我相信我必须在这里映射我的实例外部 ip,因为 localhost ip (localhost:8080) 不等于实例 ip 地址。
    • 如果您只是想了解 Kubernetes,我建议您从 minikube 开始。
    猜你喜欢
    • 1970-01-01
    • 2021-05-30
    • 2016-12-08
    • 2017-07-15
    • 1970-01-01
    • 1970-01-01
    • 2019-01-26
    • 2021-06-20
    相关资源
    最近更新 更多