0

I'm having some problems with the Kubernetes Dashboard not showing any information when I tried to access it:

enter image description here

I checked the version that I'm using:

$ kubectl version --short
Flag --short has been deprecated, and will be removed in the future. The --short output will become the default.
Client Version: v1.26.0
Kustomize Version: v4.5.7
Server Version: v1.26.0+k3s1

Both the client and the server versions are indeed the same, so I'm not sure what is causing the Dashboard UI to not show any information? Any ideas?

EDIT: I even lowered the version of my kubectl and my k3s server, but still I do not see the Unknown error go away.

Client Version: v1.25.0
Kustomize Version: v4.5.7
Server Version: v1.25.6+k3s1

$ kubectl get clusterrolebinding admin-user
NAME         ROLE                        AGE
admin-user   ClusterRole/cluster-admin   19h

$ kubectl get sa -n kubernetes-dashboard
NAME                   SECRETS   AGE
default                0         19h
kubernetes-dashboard   0         19h
admin-user             0         19h
joesan
  • 13,963
  • 27
  • 95
  • 232
  • Can you describe how did you set up your dashboard?If possible can you attach your yaml files? – Dharani Dhar Golladasari Jan 31 '23 at 09:56
  • Just followed this documentation here: https://docs.k3s.io/installation/kube-dashboard – joesan Jan 31 '23 at 10:01
  • Check your **serviceAccount** and **ClusteroleBinding** is created properly and in right namespace.If possible try to lower your server version to 1.25 because in the [official kubernetes-dashboard](https://github.com/kubernetes/dashboard/releases) page they mention the latest dashboard will support upto server v1.25. I followed the same documentation, it works for me but my setup details are like this Client Version: v1.26.0 Kustomize Version: v4.5.7 Server Version: v1.24.8. Hope you find this info useful. – Dharani Dhar Golladasari Jan 31 '23 at 11:46

1 Answers1

1

This might happen for various reasons like Either ClusterRoleBinding or ServiceAccount is not created properly. Sometimes it will be related to Compatibility as well. Try these troubleshooting steps

  1. In case if you are creating a Service Account and ClusterRoleBinding manually then make sure you are creating in proper namespace and giving proper configurations and roles.

you can use these commands to get the detials about SA and rolebindings

$kubectl get sa -n kubernetes-dashboard
NAME                   SECRETS   AGE
admin-user             0         61m
    
$kubectl get clusterrolebinding admin-user
NAME         ROLE                        AGE
admin-user   ClusterRole/cluster-admin   62m
  1. Check whether the dashboard version is compatible with the server version. You can find the compatibility information in official kubernetes-dashboard page on github. If your server is not compatible then try lowering the version.(In your case try lowering the version to 1.25).
  2. Check this official documentation for detailed kubernetes-dashboard troubleshoot

These SO links have similar issues SO1 SO2