Access kubernetes-dashboard through proxy on LKE

I have been trying to get access to the dashboard to work with LKE.

Everything seems to install fine and inspection of the pods indicates no obvious errors.

I launch:

kubectl proxy

And try to launch the usual url for access

http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/

The page sits for a while loading and then I get this message

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

  },
  "status": "Failure",
  "message": "error trying to reach service: dial tcp xxx.xxx.xxx.xxx:8443: i/o timeout",
  "reason": "ServiceUnavailable",
  "code": 503
}

I have been digging around in the logs for various pods but so far not been able to find an error message. I see the service is live and if I connect with another pod I am able to connect tot he port. Just not through the proxy.

4 Replies

Well I tried to expose the service via Ingress and now I get errors in the dashboard pod log stating:

http: TLS handshake error from xxx.xxx.xxx.xxx:52446: remote error: tls: bad certificate

I am guessing this has something to do with the way LKE is doing internal self signed certs?

Has anyone else gotten the kubernetes-dashboard to work?

hi ruffasdagut… same problem here… no workaround that i can find yet…

..thanks for sharing..

rgds,
Miguel

Hi there,

I was able to get the Kubernetes Web UI Dashboard working with kubectl proxy on my cluster.

Lets go over the steps I took:


In earlier versions of Kubernetes, I had encountered similar errors when trying to use kube proxy to access the Kubernetes Dashboard UI. Some prior research helped identify a possible cause for this behavior and additionally a work around. Given that you've deployed all the steps to this point using the same naming scheme as the guide, you can use the following command:

kubectl port-forward -n kubernetes-dashboard service/kubernetes-dashboard 8080:443

After sending this port-forward command, you should be able to load the Dashboard UI by visiting https://localhost:8080 in your local browser. It's worth noting that if you are using Chrome you will encounter a warning about this site being insecure because it is using a self-signed SSL certificate. You can type thisisunsafe on this warning page and be redirected to the dashboard.

Hope this information helps.

--BD.

BD… worked like a charm…i think the gist of my problem was copying+pasting the token…. fixed that with pbcopy

..thanks..

rgds,
Miguel

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct