How can I expose the Kubernetes dashboard via a proxy?

April 19, 2025 2 answers
Asked by PLATFORM.change
I recently learned that the Kubernetes dashboard should be exposed using a port forwarding command. The command is: `kubectl -n kubernetes-dashboard port-forward svc/kubernetes-dashboard-kong-proxy 8443:443`. Previously, I was able to simply use `kubectl proxy`, which allowed me to access the dashboard via an easy URL like `http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/#/workloads?namespace=_all`. I'm wondering if there's a way to access this newer version of the dashboard using a similar URL. By the way, I found some information on this issue [here](https://github.com/kubernetes/dashboard/issues/8767) which indicates that it's not straightforward to resolve.

Answers

_dns4cache
For me, accessing the dashboard worked like this: check out this guide on GitHub which has a way to get to the dashboard without using an ingress. Here's the link: [https://github.com/EraldyHq/kubee/blob/main/charts/kubernetes-dashboard/contrib/contrib.md#how-to-access-the-dashboard-without-ingress](https://github.com/EraldyHq/kubee/blob/main/charts/kubernetes-dashboard/contrib/contrib.md#how-to-access-the-dashboard-without-ingress)
Reply to this answer
aPrOn pocket
You could try exposing the dashboard with an ingress or directly through a load balancer instead of port forwarding. Port forwarding might not be the best long-term solution, as it feels a bit hacky for consistent access.

12mM+salt: I get that! Some people say that exposes too much, though. I'm considering looking for alternative dashboard options since there are more available now.

Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions