Search code examples
kubernetesdashboard

Kubernetes UI unreachable


I followed this guide on configuring Kubernetes on Fedora master-node, everything goes ok, but when I go for UI, I had nothing and couldn't install as described in this guide, so I created

{
  "kind": "Namespace",
  "apiVersion": "v1",
  "metadata": {
    "name": "kube-system"
  }
}

and install as

 kubectl create -f https://rawgit.com/kubernetes/dashboard/master/src/deploy/kubernetes-dashboard.yaml --namespace=kube-system

which installed fine, but now when I go for

https://<my-ip>:8080/ui

I get

{
  "paths": [
    "/api",
    "/api/v1",
    "/apis",
    "/apis/autoscaling",
    "/apis/autoscaling/v1",
    "/apis/batch",
    "/apis/batch/v1",
    "/apis/extensions",
    "/apis/extensions/v1beta1",
    "/healthz",
    "/healthz/ping",
    "/logs/",
    "/metrics",
    "/resetMetrics",
    "/swaggerapi/",
    "/version"
  ]
}

and trying to use

http://<my-ip>:8080/api/v1/proxy/namespaces/kube-system/services/kubernetes-dashboard

for access and get

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

and don't know how to fix it. Any suggestions?

Update 1 Confirmation that plugin installed

root@fed-master ~]# kubectl get deployment kubernetes-dashboard --namespace=kube-system
NAME                   DESIRED   CURRENT   UP-TO-DATE   AVAILABLE   AGE
kubernetes-dashboard   1         0         0            0           2h
[root@fed-master ~]# kubectl get svc kubernetes-dashboard --namespace=kube-system
NAME                   CLUSTER-IP       EXTERNAL-IP   PORT(S)   AGE
kubernetes-dashboard   10.254.154.193   nodes         80/TCP    2h

Update 2

kubectl --namespace=kube-system get ep kubernetes-dashboard

gives

NAME                   ENDPOINTS   AGE
kubernetes-dashboard   <none>      4h

so the question now, how can I set endpoint by myself?


Solution

  • I'm very new in Kubernetes, but I just had the dashboard work for me in a local VM cluster, so I'll share my recent experience, just in case it's helpful.

    I installed it, like you did, using

    kubectl create -f https://rawgit.com/kubernetes/dashboard/master/src/deploy/kubernetes-dashboard.yaml
    

    which gave me this output:

    deployment "kubernetes-dashboard" created
    You have exposed your service on an external port on all nodes in your
    cluster.  If you want to expose this service to the external internet, you may
    need to set up firewall rules for the service port(s) (tcp:32548) to serve traffic.
    
    See http://releases.k8s.io/release-1.2/docs/user-guide/services-firewalls.md for more details.
    service "kubernetes-dashboard" created
    

    So I access it via browser using master's IP address, and the port stated in the output, like:

    http://<kube-master-IP>:<port>
    

    In my case, it's:

    http://172.17.4.101:32548
    

    However I did it on my machine, so, as also stated in the output above, mind that:

    If you want to expose this service to the external internet, you may need to set up firewall rules for the service port(s) (tcp:32548) to serve traffic.