Having trouble to deploy kubernetes-dashboard version 7.x.x

Cluster information:

Kubernetes version:1.30.1
Cloud being used: bare-metal
Installation method:kubeadm
Host OS: ubuntu 22
CNI and version:
CRI and version:

Hello. I am fairly new to kubernetes and I have some troubles with installing kubernetes dashboard version 7.x.x via helm chart.
Commands used to install kubernetes dashboard:

helm repo add kubernetes-dashboard https://kubernetes.github.io/dashboard/
helm upgrade --install kubernetes-dashboard kubernetes-dashboard/kubernetes-dashboard --create-namespace --namespace kubernetes-dashboard

And then i just edit the service: kubectl -n kubernetes-dashboard edit svc kubernetes-dashboard-web from ClusterIP to NodePort so I can access it.
I manage to get to the UI via http://{IP}or{hostname}:30916/login but I can’t login with token. I created serviceaccount, clusterrolebind and token like in these instructions: dashboard/docs/user/access-control/creating-sample-user.md at master · kubernetes/dashboard · GitHub but i can’t log in. All I can see is an error in dashboard UI: Unknown error (200): Http failure during parsing for http://{IP}or{hostname}:30916/api/v1/csrftoken/login. I don’t see anything in kube-api server logs or anywhere else. Could you help me out?I successfuly installed kubernetes dashboard version 6.x.x. via helm chart but I really want to have the latest version. The installation for this version is quite easier (at least for me).

I ran into the same problem yesterday. Apparently Kubernetes Dashboard versions from 7.0.0 and above use Kong, a cloud-native API gateway that manages distributed applications. The new implementation of the Dashboard consists of a few microservices and Kong proxies the incoming requests to these services. That means you should expose the port of the kubernetes-dashboard-kong-proxy Service, which by default is 8443, like so:

apiVersion: v1
kind: Service
  name: kubernetes-dashboard-kong-nodeport
  namespace: kubernetes-dashboard
  - name: kong-proxy-tls
    nodePort: 32001 # Your desired port
    port: 443
    protocol: TCP
    targetPort: 8443
    app.kubernetes.io/component: app
    app.kubernetes.io/instance: kubernetes-dashboard
    app.kubernetes.io/name: kong
  type: NodePort
1 Like

I forgot to reply it here but I also managed to figure it out. Thank your answer. I found an article that really helped me, maybe it will help someone else too so i will leave it here: Kubernetes Dashboard - Deploy and Visualize your Kubernetes Cluster (kerno.io)

Hi Anze,

I’m also running same issue.
Tried to follow implementation mentioned in Kubernetes Dashboard - Deploy and Visualize your Kubernetes Cluster (kerno.io) but noticing below error:

400 The plain HTTP request was sent to HTTPS port

400 Bad Request

The plain HTTP request was sent to HTTPS port

I think its because of the 8443 target port, tried changing the target port and port number but noticing connection refused error.

Can you please explain how you got it working?

I think you are trying to access via http instead of https. Try to access dashboard via https://<your_IP>:NodePort. NodePort of your kongproxy service.

1 Like

Thank you @Anze_Dovzan_Perovic .
using https resolved my issue

1 Like