【发布时间】:2016-12-29 17:22:29
【问题描述】:
我是 Kubernetes 的新手。我刚刚遵循本指南并拥有一个 vagrant/kubernetes 集群:https://coreos.com/kubernetes/docs/latest/kubernetes-on-vagrant.html
我有兴趣查看用户界面,所以我按照这里的说明进行操作:http://kubernetes.io/docs/user-guide/ui/#deploying-the-dashboard-ui
$ kubectl proxy
Starting to serve on 127.0.0.1:8001
在浏览到上述 IP:PORT 时,<h3>Unauthorized</h3> 被提供。所以,我给 URI 加上 /ui 后缀,我们得到:
// 127.0.0.1:8001/ui redirected to http://localhost:8001/api/v1/proxy/namespaces/kube-system/services/kubernetes-dashboard
{
"kind": "Status",
"apiVersion": "v1",
"metadata": {},
"status": "Failure",
"message": "no endpoints available for service \"kubernetes-dashboard\"",
"reason": "ServiceUnavailable",
"code": 503
}
也许相关的是:
$ kubectl cluster-info
Kubernetes master is running at https://172.17.4.101:443
Heapster is running at https://172.17.4.101:443/api/v1/proxy/namespaces/kube-system/services/heapster
KubeDNS is running at https://172.17.4.101:443/api/v1/proxy/namespaces/kube-system/services/kube-dns
kubernetes-dashboard is running at https://172.17.4.101:443/api/v1/proxy/namespaces/kube-system/services/kubernetes-dashboard
$ kubectl get services
NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE
kubernetes 10.3.0.1 <none> 443/TCP 36m
我看到另一个 SO 线程 Kubernetes dashboard keeps pending with message: no endpoints available for service "kubernetes-dashboard",并发现了 get pods 和 describe pod <pod-name> --namespace=kube-system。
所以,我运行了kubectl describe pod kubernetes-dashboard-3543765157-94gj9 --namespace="kube-system",结果为:https://gist.github.com/cdaringe/b972bf5a95c9f2a7cb8386ef6bf2252b
【问题讨论】:
标签: vagrant kubernetes