Would you like to learn how to install the Kubernetes Dashboard on Ubuntu Linux? In this tutorial, we are going to show you how to install the Kubernetes Dashboard on a computer running Ubuntu Linux.

• Ubuntu 20
• Ubuntu 19
• Ubuntu 18
• Kubernetes 1.18

This tutorial assumes that you have a Kubernetes master node installed.

In our example, The Kubernetes node IP address is 192.168.15.200.

Kubernetes – Tutorials

On this page, we offer quick access to a list of tutorials related to Kubernetes.

Tutorial Kubernetes Dashboard – Installation on Ubuntu Linux

Install the list of required packages.

Copy to Clipboard

Download the required YAML file.

Copy to Clipboard

Install the required Kubernetes Dashboard configuration.

Copy to Clipboard

Here is the command output.

Copy to Clipboard

Create a service account for the Dashboard.

Copy to Clipboard

Configure the Cluster admin role to the Dashboard service account.

Copy to Clipboard

List the secrets available on the Kubernetes server.

Copy to Clipboard

Here is the command output.

Copy to Clipboard

Notice that your secret’s name will not be the same as ours.

Get the secret token value.

Copy to Clipboard

Here is the command output.

Copy to Clipboard

Take note of the token value.

In our example, this is the token value:

Copy to Clipboard

Start the proxy to enable access to the Kubernetes Dashboard.

Copy to Clipboard

Important! Access to the Kubernetes dashboard over HTTP is only allowed to the Localhost.

If this computer has a graphical interface, open your browser and access the following URL:

• http://127.0.0.1:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/

The Kubernetes Dashboard login interface should be displayed.

Kubernetes Dashboard login page

Select the Token option and enter the Kubernetes secret token.

After a successful login, the Kubernetes Dashboard should be presented.

Kubernetes Dashboard

Congratulations! You successfully finished the installation of the Kubernetes Dashboard.

Kubernetes Dashboard – Remote access using Apache proxy

Access to the Kubernetes dashboard over HTTP is only allowed to the Localhost.

Let’s use Apache as a proxy to allow remote access on the Kubernetes Dashboard.

On the Master node, install the Apache server.

Copy to Clipboard

Enable the required Apache modules.

Copy to Clipboard

Edit the Apache configuration file.

Copy to Clipboard

Add the following lines at the end of this file.

Copy to Clipboard

Create a private key and the certificate using the OpenSSL command.

Copy to Clipboard

Enter the requested information.

Copy to Clipboard

On the option named COMMON_NAME, you need to enter the IP address or hostname.

In our example, we used the IP address: 192.168.15.200

Edit the Apache configuration file for the default website.

Copy to Clipboard

Here is the file, before our configuration.

Copy to Clipboard

Here is the file, after our configuration.

Copy to Clipboard

In our example, we redirected HTTP users to the HTTPS version of the website.

In our example, the Apache server will work as a proxy and send all requests to the Kubernetes proxy.

In our example, we used self-signed certificates.

Restart the Apache service.

Copy to Clipboard

Start the proxy to enable access to the Kubernetes Dashboard.

Copy to Clipboard

Open your browser and enter the IP address of your web server.

In our example, the following URL was entered in the Browser:

• https://192.168.15.200/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/#/login

The Apache server will work as a proxy and display the Kubernetes Dashboard.

Kubernetes Dashboard login page

Select the Token option and enter the Kubernetes secret token.

After a successful login, the Kubernetes Dashboard should be presented.

Kubernetes Dashboard

Congratulations! You successfully finished the configuration of Apache as a proxy to the Kubernetes Dashboard.