How can I expose the Kubernetes dashboard via a proxy?

0
4
Asked By TechWizKid42 On

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.

2 Answers

Answered By CloudNinja09 On

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.

InquiryGuru86 -

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.

Answered By DevMasterX On

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)

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.