Kubernetes dashboard - ServiceUnavailable (503 error)

ⅰ亾dé卋堺 提交于 2020-05-14 18:44:13

问题


I am a Kubernetes newbie. I am trying to setup a Kubernetes cluster on AWS using kops. I was successfully able to setup the cluster. However, I am not able to access the Dashboard UI. (https://kubernetes.io/docs/tasks/access-application-cluster/web-ui-dashboard/#accessing-the-dashboard-ui)

When I access the master node, I see the following error:

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

I see the status of the dashboard as CrashLoopBackOff. (Please note: I have removed the names of the other pods in the following log)

~$ 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

I would sincerely appreciate any help/suggestions to get the dashboard running. Thanks in advance!


回答1:


Your using latest dashboard, looks like it required SSL certificate. try with 1.6.3 it will work with-out SSL cert.

I am running this version in my cluster.

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

Helm command to install dashboard

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


来源:https://stackoverflow.com/questions/46411598/kubernetes-dashboard-serviceunavailable-503-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!