The Kubernetes dashboard is a web-based user interface for Kubernetes clusters. It enables users to manage and troubleshoot applications running in the cluster, as well as manage the cluster itself.
Note
The kubernetes-dashboard is an optional component packaged with the Gateway. It was originally intended to support the now-deprecated Cluster Gateway for viewing pod logs and accessing CLI functions in Kubernetes clusters. If you have security concerns, you may safely uninstall the kubernetes-dashboard without affecting the core functionality of the Gateway.How to Deploy the Kubernetes Dashboard ?
To deploy a kubernetes dashboard, follow the below steps:
Run the following command to pull the helm chart.
helm pull oci://us-docker.pkg.dev/opsramp-registry/gateway-cluster-charts/kubernetes-dashboard --version 1.0.0
Run the following command to install the helm chart.
helm install kubernetes-dashboard kubernetes-dashboard-1.0.0.tgz
Run the following command to check the pod status.
kubectl get pods
Open the firefox browser and paste the kubernetes dashboard url shown below.
Example: https://172.25.251.94:30100/#/https://<nodeIp>:30100/#/
The kubernetes dashboard page will now appear. Select the token checkbox and proceed to step 6 to generate the token.
To generate the token, follow the steps below:
- For kubernetes v1.24 and higher versions run the following command.
kubectl create token kubernetes-dashboard
- For kubernetes v1.23 and below versions, follow the below two steps:
First, run the following command to get the secret key.
kubectl get secret | grep kubernetes-dashboard-token
Now, run the following command to to get the login token.
kubectl get secret <secret> -o jsonpath={.data.token} | base64 -d
Example:
kubectl get secret kubernetes-dashboard-token-4sqdp -o jsonpath={.data.token} | base64 -d
- For kubernetes v1.24 and higher versions run the following command.
Enter the token and click Sign in.
Finally, you will see the kubernetes dashboard screen shown below.