Skip to content

kubectl proxy dashboard access pattern

The kubectl proxy dashboard access pattern is a method used to access the web-based Kubernetes Dashboard UI by leveraging kubectl proxy to forward the API connection to a local address.^[terraform-helm__helm__README.md]

Access Mechanics

When running kubectl proxy, the address localhost:8001/ui automatically redirects to the specific Kubernetes Service proxy URL^[terraform-helm__helm__README.md].

This target URL follows the structure: http://localhost:8001/api/v1/namespaces/my-namespace/services/https:kubernetes-dashboard:https/proxy/^[terraform-helm__helm__README.md]

Service Name Constraint

For the automatic redirection to function correctly, the underlying Kubernetes Service must be named exactly kubernetes-dashboard^[terraform-helm__helm__README.md].

If a Helm release is installed with a different name (e.g., my-release), the resulting Service name will not match this default expectation, causing the direct localhost:8001/ui link to fail^[terraform-helm__helm__README.md].

Configuration Override

To ensure compatibility with the kubectl proxy access pattern when using Helm, the Service name can be forced to the required value by overriding the release name^[terraform-helm__helm__README.md].

This is achieved by setting the fullnameOverride parameter to kubernetes-dashboard during installation^[terraform-helm__helm__README.md]:

fullnameOverride: 'kubernetes-dashboard'

Sources

^[terraform-helm__helm__README.md]