---
title: "How to Install and Set Up Kubernetes Dashboard [Step by Step]"
description: "Get a birds eye view of your entire Kubernetes environment by learning how to set up a Kubernetes Dashboard."
canonical: "https://adamtheautomator.com/kubernetes-dashboard/"
---

# How to Install and Set Up Kubernetes Dashboard [Step by Step]

> Get a birds eye view of your entire Kubernetes environment by learning how to set up a Kubernetes Dashboard.

Source: https://adamtheautomator.com/kubernetes-dashboard/

---

ATA Learning

Tap to hide

[

ATA Learning

](/)

*   [Home](/)
*   [Tutorials](/tutorials/)
*   [Instructors](/author/)
*   [Advertising](/advertising/)
*   [Recommended Resources](/resources/)
*   [About Adam](/about-adam/)

Search for:  

*   [](https://twitter.com/adbertram)
*   [](https://github.com/Adam-the-Automator)
*   [](https://www.linkedin.com/company/adam-the-automator-llc)
*   [](/feed/)

![How to Install and Set Up Kubernetes Dashboard \[Step by Step\]](https://adamtheautomator.com/wp-content/uploads/2021/07/How-to-Install-and-Set-Up-Kubernetes-Dashboard-Step-by-Step.jpg)

# How to Install and Set Up Kubernetes Dashboard \[Step by Step\]

[![](https://secure.gravatar.com/avatar/2beb65fca997135120ed98dc6a2e57dcdf1a7d7d2f5ff687b5d91dc7ccd7a6b5?s=192&d=mm&r=g)Sagar](https://adamtheautomator.com/author/shanky-mendiratta/)13 July 20215 min. read

Categories: [DevOps](/category/devops/)

Tags:[Kubernetes](/tag/kubernetes/)

Table of Contents

*   [Prerequisites](#h-prerequisites)
*   [Installing Kubernetes Dashboard](#h-installing-kubernetes-dashboard)
*   [Setting up the Kubernetes Dashboard](#h-setting-up-the-kubernetes-dashboard)
*   [Accessing the Kubernetes Dashboard](#h-accessing-the-kubernetes-dashboard)
*   [Ensuring Resources Show up in the Dashboard](#h-ensuring-resources-show-up-in-the-dashboard)
*   [Conclusion](#h-conclusion)

If you’re deploying hundreds of containers within [Kubernetes](https://kubernetes.io/docs/concepts/overview/what-is-kubernetes/), how do you keep an eye on them all? A command-line interface won’t work. You need a visual representation of everything. Introducing [Kubernetes dashboard](https://kubernetes.io/docs/tasks/access-application-cluster/web-ui-dashboard/).

Kubernetes Dashboard is the official web-based UI for Kubernetes user interface, consisting of a group of resources to simplify cluster management.

In this tutorial, you will learn how to install and set up the Kubernetes Dashboard step by step on an Ubuntu machine.

## Prerequisites

This post will be a step-by-step tutorial. To follow along, be sure you have:

*   Ubuntu 14.04.4 LTS or greater machine with Docker installed. This tutorial uses [Ubuntu 18.04.5 LTS](https://releases.ubuntu.com/18.04/) with Docker v19.03.8 and Public IP address 13.213.48.113
*   A Kubernetes cluster.

Related:[How to Install Kubernetes on an Ubuntu machine](https://adamtheautomator.com/install-kubernetes-ubuntu/)

## Installing Kubernetes Dashboard

Before you can start to enjoy the benefits of the Kubernetes Dashboard, you must first install it, so let’s get into it. To install Kubernetes Dashboard, you’ll need the [kubectl command-line interface](https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands) tool. Kubectl is a command-line tool that manages a Kubernetes Dashboard installation and many other Kubernetes tasks.

Enough talk; let’s install the Kubernetes dashboard.

1\. First, open your favorite SSH client and connect to your Kubernetes master node.

2\. Next, install the Kubernetes dashboard by running the `kubectl apply` command as shown below. The [kubectl apply](https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#apply) command downloads the _recommended.yaml_ file and invokes the instructions within to set up each component for the dashboard.

```bash
kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.2.0/aio/deploy/recommended.yaml
```

After executing the command, `kubectl` creates a `namespace`, `service account`, `config map`, `pods`, `cluster role`, `service`, `RBAC`, and `deployments` resources representing the Kubernetes dashboard.

*   [Namespace](https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/) – Defines the Kubernetes cluster in particular [virtual clusters](https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/) on the physical clusters.
*   [Service account](https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/) – Provides an identity for processes that run in a Pod.
*   [Config Map](https://kubernetes.io/docs/concepts/configuration/configmap/) – An API object used to store non-confidential data in key-value pairs such as environment variables or command-line arguments.
*   [RBAC](https://kubernetes.io/docs/reference/access-authn-authz/rbac/) – Permissions to manage user roles in the dashboard.
*   [Service](https://kubernetes.io/docs/concepts/services-networking/service/) – A way to expose an application running with multiple sets of Pods.
*   [Deployments](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/) – Manages resources in the cluster.
*   [Pods](https://kubernetes.io/docs/concepts/workloads/pods/) – A pod is a group of one or more containers with shared storage and network resources and a specification for running the containers.
*   [Secrets](https://kubernetes.io/docs/concepts/configuration/secret/) – Stores sensitive information such as passwords, OAuth tokens, and SSH keys.

![Installing the Kubernetes dashboard by running the kubectl apply](https://adamtheautomator.com/wp-content/uploads/2021/07/Untitled-92-1.png)

Installing the Kubernetes dashboard by running the kubectl apply

3\. Now, verify all of the resources were installed successfully by running the [`kubectl get`](https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#get) command. The command below fetches information about all resources on the cluster created in the `kubernetes-dashboard` (`-n`) namespace.

```bash
kubectl get all -n kubernetes-dashboard
```

As you see below, all the resources inside the Kubernetes dashboard, such as service, deployment, replica set, pods, are deployed successfully in the cluster.

![Checking all the resources inside the Kubernetes dashboard](https://adamtheautomator.com/wp-content/uploads/2021/07/Untitled-93-1.png)

Checking all the resources inside the Kubernetes dashboard

## Setting up the Kubernetes Dashboard

By now, you have a functional Kubernetes dashboard running, but it still requires a bit of configuration to be fully functional. You must now configure the dashboard to be available outside the cluster by exposing the dashboard [service](https://kubernetes.io/docs/concepts/services-networking/service/).

Assuming you are still connected to the Kubernetes machine through the SSH client:

1\. Edit the Kubernetes dashboard service created in the previous section using the [`kubectl edit`](https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#edit) command, as shown below. Running the below command will open an editable service configuration file displaying the service configuration.

```bash
kubectl edit service/kubernetes-dashboard -n kubernetes-dashboard
```

2\. Once the file is opened, change the type of service from `ClusterIP` to `NodePort` and save the file as shown below. By default, the service is only available internally to the cluster (`ClusterIP`) but changing to `NodePort` exposes the service to the outside.

> _Setting the service type to `NodePort` allows all IPs (inside or outside of) the cluster to access the service._

In the below code snippet, the Kubernetes dashboard service is listening on TCP port 443 and maps TCP port 8443 from port 443 to the dashboard pod port TCP/8443.

```bash
# Updated the type to NodePort in the service.
 ports:
 port: 443 
 protocol: TCP
 targetPort: 8443
 selector:
 k8s-app: kubernetes-dashboard
 sessionAffinity: None
 type: NodePort 
```

3\. Find the name of each pod that step two in the previous section created using the `kubectl get pods` command enumerating all pods across all namespaces with the `--all-namespaces` parameter.

You should see a pod that starts with `kubernetes-dashboard`.

```bash
kubectl get pods --all-namespaces
```

![Using the kubectl get pods command](https://adamtheautomator.com/wp-content/uploads/2021/07/Untitled-94-1.png)

Using the `kubectl get pods` command

4\. Next, delete the Kubernetes dashboard pod using the name found in step three using the [kubectl delete](https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#delete) command. For this tutorial, the name of the pod is `kubernetes-dashboard-78c79f97b4-gjr2l`.

> _Whenever you modify the service type, you must delete the pod. Once deleted, Kubernetes will create a new one for you with the updated service type to access the entire network._

```bash
kubectl delete pod kubernetes-dashboard-78c79f97b4-gjr2l -n kubernetes-dashboard
```

5\. Verify the **kubernetes-dashboard** service has the correct type by running the `[kubectl get svc](https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#get) –all-namespace` command. You will now notice that the service type has changed to **NodePort,** and the service exposes the pod’s internal TCP port 30265 using the outside TCP port of 443.

```bash
kubectl get svc --all-namespaces
```

![Running the kubectl get svc --all-namespace command](https://adamtheautomator.com/wp-content/uploads/2021/07/Untitled-96-2.png)

Running the kubectl get svc –all-namespace command

6\. Now, create a service account using [kubectl create serviceaccount](https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#-em-serviceaccount-em-) in the `kubernetes-dashboard` namespace. You’ll need this service account to authenticate any process or application inside a container that resides within the pod.

```bash
kubectl create serviceaccount dashboard -n kubernetes-dashboard
```

> _When you create a service account, a service account token also gets generated; this token is stored as a secret object._

7\. Fetch the service token secret by running the [kubectl get secret](https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#get) command. You’ll use this token to access the dashboard in the next section.

```bash
kubectl get secret $(kubectl get serviceaccount dashboard -o jsonpath="{.secrets[0].name}") -o jsonpath="{.data.token}" | base64 --decode
```

![Running the kubectl get secret command](https://adamtheautomator.com/wp-content/uploads/2021/07/Untitled-97-1.png)

Running the [kubectl get secret](https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#get) command

8\. Create the `clusterrolebinding` rule using the [kubectl create clusterrolebinding](https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#-em-clusterrolebinding-em-) command assigning the `cluster-admin` role to the previously-created service account to have full access across the entire cluster.

```bash
kubectl create clusterrolebinding dashboard-admin -n kubernetes-dashboard  --clusterrole=cluster-admin  --serviceaccount=default:dashboard
```

## Accessing the Kubernetes Dashboard

Now that you’ve installed and set up the Kubernetes dashboard, the only thing left to do is enjoy its functionality!

Open your favorite browser and navigate to _[https://kuberntes-master-node](https://kuberntes-master-node):NodePort/#/login_ to access the Kubernetes dashboard.

> _The Kubernetes master node is the host you’ve installed the dashboard onto, while the node port is the node port found in step five of the previous section._

The main Kubernetes Dashboard page requires you to authenticate either via a valid bearer token or with a pre-existing [kubeconfig file](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/). For this tutorial, you’ll be using the token generated in the previous section to access the Kubernetes dashboard.

![Kubernetes Login Page](https://adamtheautomator.com/wp-content/uploads/2021/07/Untitled-98-1.png)

Kubernetes Login Page

Ensure you have selected **Token** and provide the secret token obtained from step seven in the previous section. If all goes well, the dashboard should authenticate you and present to you the **Services** page.

![logged in to the Kubernetes dashboard](https://adamtheautomator.com/wp-content/uploads/2021/07/Untitled-99-1.png)

logged in to the Kubernetes dashboard

## Ensuring Resources Show up in the Dashboard

Your Kubernetes dashboard is now installed and working. Great! But, as one final task, let’s create a simple deployment with the dashboard to ensure it’s working as expected.

Let’s come up with a basic example like adding an NGINX service to the cluster via the dashboard and hope it all goes well!

Assuming you are already logged into the Kubernetes dashboard:

Click on the **Services** option from the **Service** menu. You’ll see each service running on the cluster. Next, click on the add button (plus sign) on the top right-hand corner, as shown below.

![Kubernetes dashboard services menu](https://adamtheautomator.com/wp-content/uploads/2021/07/Untitled-100-1.png)

Kubernetes dashboard services menu

Copy and paste the below content into the **Create from Input** tab and click on the upload button to send the service configuration to the cluster.

```powershell
kind: Service
apiVersion: v1
metadata:
  name: NGINX
  namespace: default
  labels:
    app: NGINX
spec:
  ports:
    - name: 80-80
      protocol: TCP
      port: 80
      targetPort: 80
      nodePort: 31083
  selector:
    app: nginx
  clusterIP: 10.111.160.87
  clusterIPs:
    - 10.111.160.87
  type: NodePort
  sessionAffinity: None
  externalTrafficPolicy: Cluster
  ipFamilies:
    - IPv4
  ipFamilyPolicy: SingleStack
status:
  loadBalancer: {}
```

![Creating the service in the Kubernetes dashboard.](https://adamtheautomator.com/wp-content/uploads/2021/07/Untitled-2021-07-13T130343.628.png)

Creating the service in the Kubernetes dashboard.

If all goes well, the dashboard should then display the **nginx** service on the **Services** page!

![NGINX service is deployed on the Kubernetes dashboard.](https://adamtheautomator.com/wp-content/uploads/2021/07/Untitled-2021-07-13T130410.299-1024x386.png)

NGINX service is deployed on the Kubernetes dashboard.

NGINX service is deployed on the Kubernetes dashboard.

## Conclusion

You should now know how to deploy and access the Kubernetes dashboard. The Kubernetes dashboard is a visual way to manage all of your cluster resources without dropping down to the command line.

Now that you have a Kubernetes dashboard set up, what applications will you deploy next to it?

Share this article

[Share on X](https://twitter.com/intent/tweet?url=https%3A%2F%2Fadamtheautomator.com%2Fkubernetes-dashboard%2F&text=How%20to%20Install%20and%20Set%20Up%20Kubernetes%20Dashboard%20%5BStep%20by%20Step%5D)[Share on Facebook](https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fadamtheautomator.com%2Fkubernetes-dashboard%2F)[Share on LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fadamtheautomator.com%2Fkubernetes-dashboard%2F)

## Related Posts

![](https://adamtheautomator.com/wp-content/uploads/2026/07/featured_image-3.png)

### [Build Your First Internal Developer Platform](/build-first-internal-developer-platform/)

Build your first Internal Developer Platform with Backstage, a software catalog, software templates, CI/CD handoffs, and Kubernetes deployment manifests.

![](https://adamtheautomator.com/wp-content/uploads/2026/06/featured_image-9.png)

### [DevOps to Platform Engineer: 2026 Transition Roadmap](/devops-platform-engineer-2026-transition-roadmap/)

Learn how to move from DevOps to platform engineering in 2026 with a practical roadmap covering transferable skills, internal developer platforms, Backstage, Crossplane, and portfolio projects.

![](https://adamtheautomator.com/wp-content/uploads/2024/02/kubernetes-blue-green.jpg)

### [Learning the Kubernetes Blue Green Deployment Strategy](/kubernetes-blue-green/)

Dive into Kubernetes blue-green deployments for smooth updates. Enhance your release process with this smart Kubernetes strategy!

## Categories

*   [IT Ops](/category/it-ops/)
*   [Cloud](/category/cloud/)
*   [DevOps](/category/devops/)
*   [Home Ops](/category/home-ops/)
*   [Information Security](/category/infosec/)
*   [Software Development](/category/software-development/)

## Site

*   [Home](/)
*   [Tutorials](/tutorials/)
*   [Instructors](/author/)
*   [Advertising](/advertising/)
*   [Recommended Resources](/resources/)
*   [About Adam](/about-adam/)

Copyright 2026© ATA Learning | [Privacy Policy](/privacy/)
