The Kubernetes Dashboard is an official Kubernetes web-based user interface for accessing the Kubernetes cluster and deploying applications. It displays all running workloads and provides a detailed overview of the cluster’s applications. Individual Kubernetes resources, such as Deployments, Jobs, and DaemonSets, can be created, modified, or deleted directly from the dashboard. It makes scalability, rolling updates, and deploying new applications easier by giving you information on the health of resources and faults and the ability to inspect pod logs for troubleshooting.

By looking into more detail surrounding the Kubernetes Dashboard, this tutorial will outline how to deploy this interface using the Civo Marketplace application.

In this video @KunalKushwaha goes through how to deploy the Kubernetes Dashboard using the Civo Marketplace. Discover the step-by-step process of accessing your cluster, obtaining the necessary token, and starting the server on your local system. The Kubernetes Dashboard offers a user-friendly interface for managing clusters, deploying applications, and monitoring workloads. Explore its benefits such as centralized management, simplified troubleshooting, and resource management. However, be aware of limitations such as security issues and compatibility concerns. Enhance your Kubernetes skills today with this informative video!

Prerequisite

Before we get started, you should have the following in place:

Installing the Kubernetes Dashboard

You can install the Kubernetes Dashboard from the Civo Marketplace through UI or by using the Civo CLI.

UI from Civo Marketplace

Once your Kubernetes cluster has been launched, login to your Civo dashboard and go to Kubernetes > Marketplace as seen in the screenshot below:

Civo Marketplace

In the Marketplace section, select the ‘Management’ tab, and click on ‘Kubernetes Dashboard.’ Click “Install Apps” from here to install the Kubernetes Dashboard application inside the cluster.

Civo CLI

To install the Kubernetes Dashboard application using Civo CLI, you will need to use the command:

civo kubernetes applications add kubernetes-dashboard --cluster <CLUSTER-NAME>

For CLUSTER-NAME put the actual name of the cluster.

The above command will start the installation of the Kubernetes Dashboard Marketplace application.

If no errors occur during installation, the Kubernetes Dashboard has been successfully installed into your cluster. This implies that you can proceed to utilize the dashboard for effective management and monitoring of your Kubernetes environment.

Accessing your Kubernetes Dashboard

By following the above steps, you should now have installed the Kubernetes Dashboard from the Civo Marketplace. Now to access the cluster, you must obtain the bearer token for the admin service account. To do this, run the following command:

kubectl -n kubernetes-dashboard describe secret admin-user-token | grep ^token

The above command will provide the token, please save it in a safe location, we have to use this token again to access the dashboard.

To enable access to the Kubernetes Dashboard using the kubectl command-line tool, execute the following command:

kubectl proxy

The dashboard will now be accessible at the following URL: http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/

To access the dashboard, enter the token you obtained by selecting ‘Sign In’ and ‘Bearer Token.’ It is not recommended to use ‘kubeconfig’ since it is not regarded as the best way to access the Kubernetes Dashboard.

Kubernetes Dashboard

You will now have access to the dashboard!

An overview of the Kubernetes Dashboard

When accessing the Kubernetes Dashboard for the first time on an empty cluster, you’ll be able to view:

  • Additional documentation
  • A button to deploy your first application
  • View default system applications running in the kube-system namespace
  • Resources running in different namespaces

The Dashboard UI provides various sections that offer different views and functionalities for managing your Kubernetes cluster.

Kubernetes Dashboard UI

Workloads

In Workloads section allows you to manage and monitor the applications running on your cluster. It provides an overview of the following:

  • Deployments
  • Replica sets
  • Stateful sets
  • Daemon sets
  • Cron jobs

These workloads can be created, updated, and deleted, as well as their status and resource use viewed. It enables you to scale your applications, change their configurations, and analyze workload logs and events.

Kubernetes Dashboard Workloads

Services

The Services area allows you to control and monitor your cluster’s services and ingress. It displays information about each Service, such as the:

  • Namespace
  • Labels
  • Cluster IP address

You can also observe the service type, such as ClusterIP, NodePort, or LoadBalancer. The view also displays service-related events, which can be useful for troubleshooting and monitoring. This section enables you to conveniently manage, configure, and monitor your services and ingresses inside the Dashboard UI.

Kubernetes Dashboard Discovery and Load Balancing

Nodes

Whilst the Nodes section provides information about the nodes in your cluster, you can also see the CPU and memory consumption by nodes in a graphical way. When clicking on a specific node, you will get information surrounding the node, such as:

  • Metadata
  • Resource information
  • Allocation
  • Conditions
  • Pods that are running on that node
  • How much CPU and memory are consumed

Kubernetes Dashboard Nodes

Config and Storage

This section provides details about the secrets used in the cluster and stores sensitive information securely, such as passwords or API keys. Through here, you can also get information about specific configmap and an overview of all PVCs in your cluster. It includes details such as the volume name, status, capacity, storage class, and access mode. This allows you to track and manage the storage resources used by applications in your cluster effectively.

Kubernetes Dashboard Config and Storage

Creating Containerized Applications through Kubernetes Dashboard

To create a new resource, click on the ‘+ CREATE’ button shown on the upper right side. This will open a new page to create a resource and provide you with 3 options to create resources:

Create from Input: Here, you have to write the yaml or json file for the resource and have to click on the Upload button to create the resources.

yaml or json file in Kubernetes Dashboard

Create from File: If your yaml file is already created, and you want to upload the files to the dashboard, you can upload by using this.

Create from File in Kubernetes Dashboard

Create from Form: Here, you will get a form to create deployment and service where you will have to fill in 3-4 options. This will create your resource automatically, based on your inputs.

Create from Form in Kubernetes Dashboard

Editing the Pod configuration using Dashboard

When you click on the pod, it will describe it and display how many resources it is using. If you wish to update some of the pod's configuration via the dashboard, click the edit button, and you'll obtain the YAML file; change the YAML file as needed. If your settings are correct, it will change; otherwise, it will be refused.

Checking the Logs of Pods

The dashboard also allows you to view the logs of the pods and adjust the pod's specifications. To see the pod, go to Workloads > Pod > Pod Name> View Logs (4 lines in parallel), and you'll see the pod's logs. It assists you in troubleshooting issues.

Checking the Logs of Pods in Kubernetes Dashboard

The Benefits of Kubernetes Dashboard

The Kubernetes dashboard offers numerous benefits that make it an essential tool for Kubernetes cluster management, including:

  1. User-Friendly Interface: The dashboard provides an easy-to-use interface that simplifies the process of deploying, managing, and monitoring Kubernetes applications.
  2. Centralized Management: Manage all your Kubernetes resources, including Deployments, Pods, Services, ConfigMaps, and more, from a single location.
  3. Simplified Troubleshooting: A centralized location for troubleshooting containerized applications by displaying any errors that may have occurred, allowing you to resolve them quickly.
  4. Resource Management: Manage resource utilization, including CPU and memory usage, for each application running in your Kubernetes cluster.

The Drawbacks of Kubernetes Dashboard

On the other hand, it is important to be aware of the drawbacks associated with Kubernetes Dashboard:

  1. Security Concerns: Since the Kubernetes dashboard is web-based, it can be vulnerable to security threats if not properly secured. Access to the dashboard should be restricted to authorized personnel and protected using secure authentication and authorization mechanisms.
  2. Performance Overhead: The dashboard can impose some performance overhead on the Kubernetes cluster, especially when monitoring a large number of resources simultaneously. However, this can be mitigated by optimizing the dashboard settings and resources appropriately.
  3. Limited Functionality: The Kubernetes dashboard provides a range of features for managing and monitoring Kubernetes resources, but it may not be sufficient for some advanced use cases. In such scenarios, additional tools or plugins may be required to extend the functionality of the dashboard.
  4. Compatibility Issues: It may not be compatible with all Kubernetes versions, especially when using older versions of Kubernetes. This can cause issues with compatibility and functionality, requiring upgrades or changes to the Kubernetes cluster.
  5. Complexity: Kubernetes itself can be complex, and the dashboard adds another layer of complexity to managing Kubernetes resources. As such, users may require some level of training and expertise to utilize the dashboard effectively.

Summary

In this tutorial, we have discussed the installation of the Kubernetes Dashboard via the Civo Marketplace. We have explored the process of accessing and utilizing the Kubernetes dashboard, along with its associated benefits and limitations.

For further insights into the Kubernetes Dashboard and alternative solutions, you can take a look at: https://www.civo.com/blog/kubernetes-dashboards

I hope you found this tutorial valuable and informative.