no endpoints available for service for kubernetes dashboard

 ̄綄美尐妖づ 提交于 2020-12-08 13:30:12

问题


According to following information, kubernetes-dashboard is creaded. I start kubectl prox to access the dashboard

[root@master ~]# kubectl create -f https://raw.githubusercontent.com/kubernetes/dashboard/master/aio/deploy/recommended/kubernetes-dashboard.yaml
secret/kubernetes-dashboard-certs created
secret/kubernetes-dashboard-csrf created
serviceaccount/kubernetes-dashboard created
role.rbac.authorization.k8s.io/kubernetes-dashboard-minimal created
rolebinding.rbac.authorization.k8s.io/kubernetes-dashboard-minimal created
deployment.apps/kubernetes-dashboard created
service/kubernetes-dashboard created
[root@master ~]# kubectl proxy --address="192.168.88.43" -p 8001 --accept-hosts='^*$'
Starting to serve on 192.168.88.43:8001

when I go below url

http://192.168.88.43:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/

i get the

{
  "kind": "Status",
  "apiVersion": "v1",
  "metadata": {

  },
  "status": "Failure",
  "message": "no endpoints available for service \"kubernetes-dashboard\"",
  "reason": "ServiceUnavailable",
  "code": 503
}

回答1:


I think you followed the Deploying the Dashboard UI but, you did not follow the whole installation process Creating a single master cluster with kubeadm correctly.

You might have missed:

You should now deploy a pod network to the cluster.

Run "kubectl apply -f [podnetwork].yaml" with one of the options listed at:

https://kubernetes.io/docs/concepts/cluster-administration/addons/

You can follow the Kubernetes documentation on how to Installing a pod network add-on.

Once done, you can verify if CNI is deployed and working using kubectl -n kube-system get pods.

If everything goes correctly your kubernetes-dashboard should be healthy and working.



来源:https://stackoverflow.com/questions/54566764/no-endpoints-available-for-service-for-kubernetes-dashboard

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