Kubernetes 仪表板 - 服务不可用(503 错误)

Kubernetes dashboard - ServiceUnavailable (503 error)

我是 Kubernetes 新手。我正在尝试使用 kops 在 AWS 上设置 Kubernetes 集群。我成功地设置了集群。但是,我无法访问仪表板 UI。 (https://kubernetes.io/docs/tasks/access-application-cluster/web-ui-dashboard/#accessing-the-dashboard-ui)

当我访问主节点时,我看到以下错误:

{
  "kind": "Status",
  "apiVersion": "v1",
  "metadata": {},
  "status": "Failure",
  "message": "no endpoints available for service \"kubernetes-dashboard\"",
  "reason": "ServiceUnavailable",
  "code": 503
}

我看到仪表板的状态为 CrashLoopBackOff。 (请注意:我已经删除了以下日志中其他pods的名字)

~$ kubectl get pods --all-namespaces
NAMESPACE     NAME                                                    READY     STATUS             RESTARTS   AGE
kube-system   kubernetes-dashboard-4167803980-vnx3k                   0/1       CrashLoopBackOff   6          6m

$ kubectl logs kubernetes-dashboard-4167803980-vnx3k --namespace=kube-system
2017/09/25 17:50:37 Using in-cluster config to connect to apiserver
2017/09/25 17:50:37 Using service account token for csrf signing
2017/09/25 17:50:37 No request provided. Skipping authorization
2017/09/25 17:50:37 Starting overwatch
2017/09/25 17:50:37 Successful initial request to the apiserver, version: v1.7.2
2017/09/25 17:50:37 New synchronizer has been registered: kubernetes-dashboard-key-holder-kube-system. Starting
2017/09/25 17:50:37 Starting secret synchronizer for kubernetes-dashboard-key-holder in namespace kube-system
2017/09/25 17:50:37 Initializing secret synchronizer synchronously using secret kubernetes-dashboard-key-holder from namespace kube-system
2017/09/25 17:50:37 Initializing JWE encryption key from synchronized object
2017/09/25 17:50:37 Creating in-cluster Heapster client
2017/09/25 17:50:37 Serving securely on HTTPS port: 8443
2017/09/25 17:50:37 open /certs/dashboard.crt: no such file or directory

非常感谢任何 help/suggestions 获得仪表板 运行。提前致谢!

您使用的是最新的仪表板,看起来需要 SSL 证书。尝试使用 1.6.3 它将在没有 SSL 证书的情况下工作。

我在我的集​​群中 运行 这个版本。

kubectl create -f https://raw.githubusercontent.com/kubernetes/dashboard/v1.6.3/src/deploy/kubernetes-dashboard.yaml

安装仪表板的 Helm 命令

kubectl create clusterrolebinding add-on-cluster-admin --clusterrole=cluster-admin  --serviceaccount=kube-system:default
helm install stable/kubernetes-dashboard  --name kubernetes-dashboard --namespace  kube-system --debug
helm install stable/heapster  --namespace  kube-system