Back

How to install Web UI (Dashboard)

According to the Kubernetes documentation:

"Dashboard is a web-based Kubernetes user interface. You can use Dashboard to deploy containerized applications to a Kubernetes cluster, troubleshoot your containerized applications, and manage the cluster resources."

web UI dashboard

Below is a step-by-step guide on installing the Kubernetes Dashboard and accessing it using a token issued in the customer portal.

Deploying the Kubernetes Dashboard

The installation command depends on the Dashboard version. In case of errors in the console output or updates, refer to the Kubernetes documentation.

Kubernetes Dashboard supports only Helm-based installation currently as it is faster and gives us better control over all dependencies required by Dashboard to run.

  1. Install Helm
  2. Add the Kubernetes Dashboard repository:
     helm repo add kubernetes-dashboard https://kubernetes.github.io/dashboard/
  3. Deploy the Kubernetes Dashboard:
     helm upgrade --install kubernetes-dashboard kubernetes-dashboard/kubernetes-dashboard --create-namespace --namespace kubernetes-dashboard

The Kubernetes Dashboard will now be deployed in your cluster.

Accessing the Dashboard UI

Create a Dashboard user

This example demonstrates how to create a user account with administrative rights. If you need to create a new user, assign permissions, and generate an individual token for that user, refer to the creating a sample user.

  1. Create a manifest file (e.g., dashboard-adminuser.yaml) and add the following snippets to it:
    1. Creating ServiceAccount with the name admin-user in namespace kubernetes-dashboard:
      apiVersion: v1
      kind: ServiceAccount
      metadata:
      	name: admin-user
      	namespace: kubernetes-dashboard
      
    2. Creating a ClusterRoleBinding for the ServiceAccount
      apiVersion: rbac.authorization.k8s.io/v1
      kind: ClusterRoleBinding
      metadata:
      	name: admin-user
      roleRef:
      	apiGroup: rbac.authorization.k8s.io
      	kind: ClusterRole
      	name: cluster-admin
      subjects:
      	- kind: ServiceAccount
      	name: admin-user
      	namespace: kubernetes-dashboard
      
  2. Save the file and apply it using the following command:
    kubectl apply -f {path to the dashboard-adminuser.yaml file}

The user account has now been successfully created.

Command line proxy

You can enable access to the Dashboard using the kubectl command-line tool, by executing the following command:

kubectl -n kubernetes-dashboard port-forward svc/kubernetes-dashboard-kong-proxy 8443:443

Kubectl will make Dashboard available at https://localhost:8443.

In the Bearer Token field, enter the value obtained from the customer portal Kubernetes Cluster DetailsSecret field.

Access to Kubernetes dashboard

The UI can only be accessed from the machine where the command is executed. Use the kubectl port-forward --help command for more options.

Suggested Articles

  • Kubernetes clusters

    Kubernetes patch-version upgrades

  • Kubernetes clusters

    How to access a Kubernetes cluster