Explore Courses
course iconScrum AllianceCertified ScrumMaster (CSM) Certification
  • 16 Hours
Best seller
course iconScrum AllianceCertified Scrum Product Owner (CSPO) Certification
  • 16 Hours
Best seller
course iconScaled AgileLeading SAFe 6.0 Certification
  • 16 Hours
Trending
course iconScrum.orgProfessional Scrum Master (PSM) Certification
  • 16 Hours
course iconScaled AgileSAFe 6.0 Scrum Master (SSM) Certification
  • 16 Hours
course iconScaled Agile, Inc.Implementing SAFe 6.0 (SPC) Certification
  • 32 Hours
Recommended
course iconScaled Agile, Inc.SAFe 6.0 Release Train Engineer (RTE) Certification
  • 24 Hours
course iconScaled Agile, Inc.SAFe® 6.0 Product Owner/Product Manager (POPM)
  • 16 Hours
Trending
course iconKanban UniversityKMP I: Kanban System Design Course
  • 16 Hours
course iconIC AgileICP Agile Certified Coaching (ICP-ACC)
  • 24 Hours
course iconScrum.orgProfessional Scrum Product Owner I (PSPO I) Training
  • 16 Hours
course iconAgile Management Master's Program
  • 32 Hours
Trending
course iconAgile Excellence Master's Program
  • 32 Hours
Agile and ScrumScrum MasterProduct OwnerSAFe AgilistAgile CoachFull Stack Developer BootcampData Science BootcampCloud Masters BootcampReactNode JsKubernetesCertified Ethical HackingAWS Solutions Artchitct AssociateAzure Data Engineercourse iconPMIProject Management Professional (PMP) Certification
  • 36 Hours
Best seller
course iconAxelosPRINCE2 Foundation & Practitioner Certificationn
  • 32 Hours
course iconAxelosPRINCE2 Foundation Certification
  • 16 Hours
course iconAxelosPRINCE2 Practitioner Certification
  • 16 Hours
Change ManagementProject Management TechniquesCertified Associate in Project Management (CAPM) CertificationOracle Primavera P6 CertificationMicrosoft Projectcourse iconJob OrientedProject Management Master's Program
  • 45 Hours
Trending
course iconProject Management Master's Program
  • 45 Hours
Trending
PRINCE2 Practitioner CoursePRINCE2 Foundation CoursePMP® Exam PrepProject ManagerProgram Management ProfessionalPortfolio Management Professionalcourse iconAWSAWS Certified Solutions Architect - Associate
  • 32 Hours
Best seller
course iconAWSAWS Cloud Practitioner Certification
  • 32 Hours
course iconAWSAWS DevOps Certification
  • 24 Hours
course iconMicrosoftAzure Fundamentals Certification
  • 16 Hours
course iconMicrosoftAzure Administrator Certification
  • 24 Hours
Best seller
course iconMicrosoftAzure Data Engineer Certification
  • 45 Hours
Recommended
course iconMicrosoftAzure Solution Architect Certification
  • 32 Hours
course iconMicrosoftAzure Devops Certification
  • 40 Hours
course iconAWSSystems Operations on AWS Certification Training
  • 24 Hours
course iconAWSArchitecting on AWS
  • 32 Hours
course iconAWSDeveloping on AWS
  • 24 Hours
course iconJob OrientedAWS Cloud Architect Masters Program
  • 48 Hours
New
course iconCareer KickstarterCloud Engineer Bootcamp
  • 100 Hours
Trending
Cloud EngineerCloud ArchitectAWS Certified Developer Associate - Complete GuideAWS Certified DevOps EngineerAWS Certified Solutions Architect AssociateMicrosoft Certified Azure Data Engineer AssociateMicrosoft Azure Administrator (AZ-104) CourseAWS Certified SysOps Administrator AssociateMicrosoft Certified Azure Developer AssociateAWS Certified Cloud Practitionercourse iconAxelosITIL 4 Foundation Certification
  • 16 Hours
Best seller
course iconAxelosITIL Practitioner Certification
  • 16 Hours
course iconPeopleCertISO 14001 Foundation Certification
  • 16 Hours
course iconPeopleCertISO 20000 Certification
  • 16 Hours
course iconPeopleCertISO 27000 Foundation Certification
  • 24 Hours
course iconAxelosITIL 4 Specialist: Create, Deliver and Support Training
  • 24 Hours
course iconAxelosITIL 4 Specialist: Drive Stakeholder Value Training
  • 24 Hours
course iconAxelosITIL 4 Strategist Direct, Plan and Improve Training
  • 16 Hours
ITIL 4 Specialist: Create, Deliver and Support ExamITIL 4 Specialist: Drive Stakeholder Value (DSV) CourseITIL 4 Strategist: Direct, Plan, and ImproveITIL 4 Foundationcourse iconJob OrientedData Science Bootcamp
  • 6 Months
Trending
course iconJob OrientedData Engineer Bootcamp
  • 289 Hours
course iconJob OrientedData Analyst Bootcamp
  • 6 Months
course iconJob OrientedAI Engineer Bootcamp
  • 288 Hours
New
Data Science with PythonMachine Learning with PythonData Science with RMachine Learning with RPython for Data ScienceDeep Learning Certification TrainingNatural Language Processing (NLP)TensorflowSQL For Data Analyticscourse iconIIIT BangaloreExecutive PG Program in Data Science from IIIT-Bangalore
  • 12 Months
course iconMaryland UniversityExecutive PG Program in DS & ML
  • 12 Months
course iconMaryland UniversityCertificate Program in DS and BA
  • 31 Weeks
course iconIIIT BangaloreAdvanced Certificate Program in Data Science
  • 8+ Months
course iconLiverpool John Moores UniversityMaster of Science in ML and AI
  • 750+ Hours
course iconIIIT BangaloreExecutive PGP in ML and AI
  • 600+ Hours
Data ScientistData AnalystData EngineerAI EngineerData Analysis Using ExcelDeep Learning with Keras and TensorFlowDeployment of Machine Learning ModelsFundamentals of Reinforcement LearningIntroduction to Cutting-Edge AI with TransformersMachine Learning with PythonMaster Python: Advance Data Analysis with PythonMaths and Stats FoundationNatural Language Processing (NLP) with PythonPython for Data ScienceSQL for Data Analytics CoursesAI Advanced: Computer Vision for AI ProfessionalsMaster Applied Machine LearningMaster Time Series Forecasting Using Pythoncourse iconDevOps InstituteDevOps Foundation Certification
  • 16 Hours
Best seller
course iconCNCFCertified Kubernetes Administrator
  • 32 Hours
New
course iconDevops InstituteDevops Leader
  • 16 Hours
KubernetesDocker with KubernetesDockerJenkinsOpenstackAnsibleChefPuppetDevOps EngineerDevOps ExpertCI/CD with Jenkins XDevOps Using JenkinsCI-CD and DevOpsDocker & KubernetesDevOps Fundamentals Crash CourseMicrosoft Certified DevOps Engineer ExperteAnsible for Beginners: The Complete Crash CourseContainer Orchestration Using KubernetesContainerization Using DockerMaster Infrastructure Provisioning with Terraformcourse iconTableau Certification
  • 24 Hours
Recommended
course iconData Visualisation with Tableau Certification
  • 24 Hours
course iconMicrosoftMicrosoft Power BI Certification
  • 24 Hours
Best seller
course iconTIBCO Spotfire Training
  • 36 Hours
course iconData Visualization with QlikView Certification
  • 30 Hours
course iconSisense BI Certification
  • 16 Hours
Data Visualization Using Tableau TrainingData Analysis Using Excelcourse iconEC-CouncilCertified Ethical Hacker (CEH v12) Certification
  • 40 Hours
course iconISACACertified Information Systems Auditor (CISA) Certification
  • 22 Hours
course iconISACACertified Information Security Manager (CISM) Certification
  • 40 Hours
course icon(ISC)²Certified Information Systems Security Professional (CISSP)
  • 40 Hours
course icon(ISC)²Certified Cloud Security Professional (CCSP) Certification
  • 40 Hours
course iconCertified Information Privacy Professional - Europe (CIPP-E) Certification
  • 16 Hours
course iconISACACOBIT5 Foundation
  • 16 Hours
course iconPayment Card Industry Security Standards (PCI-DSS) Certification
  • 16 Hours
course iconIntroduction to Forensic
  • 40 Hours
course iconPurdue UniversityCybersecurity Certificate Program
  • 8 Months
CISSPcourse iconCareer KickstarterFull-Stack Developer Bootcamp
  • 6 Months
Best seller
course iconJob OrientedUI/UX Design Bootcamp
  • 3 Months
Best seller
course iconEnterprise RecommendedJava Full Stack Developer Bootcamp
  • 6 Months
course iconCareer KickstarterFront-End Development Bootcamp
  • 490+ Hours
course iconCareer AcceleratorBackend Development Bootcamp (Node JS)
  • 4 Months
ReactNode JSAngularJavascriptPHP and MySQLcourse iconPurdue UniversityCloud Back-End Development Certificate Program
  • 8 Months
course iconPurdue UniversityFull Stack Development Certificate Program
  • 9 Months
course iconIIIT BangaloreExecutive Post Graduate Program in Software Development - Specialisation in FSD
  • 13 Months
Angular TrainingBasics of Spring Core and MVCFront-End Development BootcampReact JS TrainingSpring Boot and Spring CloudMongoDB Developer Coursecourse iconBlockchain Professional Certification
  • 40 Hours
course iconBlockchain Solutions Architect Certification
  • 32 Hours
course iconBlockchain Security Engineer Certification
  • 32 Hours
course iconBlockchain Quality Engineer Certification
  • 24 Hours
course iconBlockchain 101 Certification
  • 5+ Hours
NFT Essentials 101: A Beginner's GuideIntroduction to DeFiPython CertificationAdvanced Python CourseR Programming LanguageAdvanced R CourseJavaJava Deep DiveScalaAdvanced ScalaC# TrainingMicrosoft .Net Frameworkcourse iconSalary Hike GuaranteedSoftware Engineer Interview Prep
  • 3 Months
Data Structures and Algorithms with JavaScriptData Structures and Algorithms with Java: The Practical GuideLinux Essentials for Developers: The Complete MasterclassMaster Git and GitHubMaster Java Programming LanguageProgramming Essentials for BeginnersComplete Python Programming CourseSoftware Engineering Fundamentals and Lifecycle (SEFLC) CourseTest-Driven Development for Java ProgrammersTypeScript: Beginner to Advanced

Kubernetes Dashboard: How to Deploy and Access It

By Mayank Modi

Updated on Nov 05, 2022 | 8 min read

Share:

Kubernetes (sometimes shortened to K8s with the 8 standing for the number of letters between the “K” and the “s”) is an open-source system to deploy, scale, and manage containerized applications anywhere. Kubernetes is a container-centric management software that allows the creation and deployment of containerized applications with ease. Originally created by Google Cloud in 2014, Kubernetes is now being offered by leading Cloud Providers like AWS and Azure. Kubernetes offers a dashboard (Web User Interface)  to monitor all the workflows running in the cluster. Using the dashboard, we can monitor the usage, and the stress of clusters as well as basic resource usage and logs of the services running in the clusters. A Certified Kubernetes Administrator / CKA Course is the best way to learn the deployment of the Kubernetes dashboard. 

What is the Kubernetes Dashboard?

Kubernetes Dashboard is a general-purpose, web-based UI for Kubernetes clusters. It allows users to manage applications running in the cluster and troubleshoot them, as well as manage the cluster itself.

As in the image, the Kubernetes UI offers a variety of services like scheduling cron jobs, shows the current usage of nodes and pods present in the cluster. All the settings can be configured using the dashboard itself. 

Deploying the Dashboard UI

Direct Method:

To deploy the dashboard in the Kubernetes cluster. Please follow the below steps. 

  • Execute following command: kubectl apply -f
  • To access Dashboard from your local workstation you must create a secure channel to your Kubernetes cluster. Run the following command :kubectl proxy 

To access the Kubernetes dashboard open this on your browser - http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/. 

You should now see the Kubernetes dashboard deployed during cluster creation. 

using Helm

Alternatively, Kubernetes dashboard can also be installed using Helm  

To install the Chart with the Release name kubernetes-dashboard: 

helm repo add kubernetes-dashboard

helm install kubernetes-dashboard kubernetes-dashboard/kubernetes-dashboard

The following command deploys the Kubernetes dashboard in the default setting. We can also change configurations like the following command. 

helm install kubernetes-dashboard/kubernetes-dashboard --name kubernetes-dashboard \ 

 --set=service.externalPort=8080,resources.limits.cpu=200m

Specify each parameter using the --set key=value[,key=value] argument to helm install 

Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart. For example,

helm install kubernetes-dashboard/kubernetes-dashboard --name kubernetes-dashboard -f values.yaml

Uninstalling the Chart on Helm 

We can also uninstall the Kubernetes dashboard using helm charts. The following command uninstalls the helm chart for Kubernetes dashboard. 

helm delete kubernetes-dashboard

It deletes the entire Kubernetes components and their releases. 

Accessing the Dashboard UI 

It is possible to access the Kubernetes UI using Authentication Token(RBAC). We will have to create a new user account using the service account mechanism of Kubernetes, grant the user admin permissions and login into the dashboard using the bearer token tied to the user. The tokens differ for each user. 

We can now look at the steps of creating a new user in Kubernetes: 

1. Create a  Service Account with any name in the namespace Kubernetes-dashboard first. I have attached a sample YAML file.

apiVersion: v1 
kind: ServiceAccount 
metadata: 
  name: user 
  namespace: kubernetes-dashboard 

2. Create a ClusterRoleBinding 

If you are using kops, kubeadm or any other popular tool, the ClusterRole cluster-admin already exists in the cluster. We can use it and create only a ClusterRoleBinding for our ServiceAccount. If it does not exist then you need to create this role first and grant required privileges manually.

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

3. Generate a bearer token: 

Execute the following command: 

kubectl -n kubernetes-dashboard create token admin

It should print something like:eyJhbGciOiJSUzI1NiIsImtpZCI6IiJ9.eyJpc3MiOiJrdWJlcm5ldGVzL3NlcnZpY2VhY2NvdW50Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9uYW1lc3BhY2UiOiJrdWJlcm5ldGVzLWRhc2hib2FyZCIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VjcmV0Lm5hbWUiOiJhZG1pbi11c2VyLXRva2VuLXY1N253Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9zZXJ2aWNlLWFjY291bnQubmFtZSI6ImFkbWluLXVzZXIiLCJrdWJlcm5ldGVzLmlvL3NlcnZpY2VhY2NvdW50L3NlcnZpY2UtYWNjb3VudC51aWQiOiIwMzAzMjQzYy00MDQwLTRhNTgtOGE0Ny04NDllZTliYTc5YzEiLCJzdWIiOiJzeXN0ZW06c2VydmljZWFjY291bnQ6a3ViZXJuZXRlcy1kYXNoYm9hcmQ6YWRtaW4tdXNlciJ9.Z2JrQlitASVwWbc-s6deLRFVk5DWD3P_vjUFXsqVSY10pbjFLG4njoZwh8p3tLxnX_VBsr7_6bwxhWSYChp9hwxznemD5x5HLtjb16kI9Z7yFWLtohzkTwuFbqmQaMoget_nYcQBUC5fDmBHRfFvNKePh_vSSb2h_aYXa8GV5AcfPQpY7r461itme1EXHQJqv-SN-zUnguDguCTjD80pFZ_CmnSE1z9QdMHPB8hoB4V68gtswR1VLa6mSYdgPwCHauuOobojALSaMc3RH7MmFUumAgguhqAkX3Omqd3rJbYOMRuMjhANqd08piDC3aIabINX6gP5-Tuuw2svnV6NYQ 

Copy the token and paste it into the Enter token field on the login screen.

Click on the sign in button and you will be able to access the dashboard. 

Kubernetes Dashboard Overview and Basic Operations

Let's look at the basic elements that can be monitored using the Kubernetes Dashboard. 

There are two segments by which we can monitor the usage of resources. 

  • Cluster Level 
  • Workloads Level 

Cluster Level

This segment can be used to monitor the metrics from a cluster level. Basically, we can monitor Cluster Roles, Namespaces, Nodes, Persistent Volumes and Storage classes. 

All the metrics are calculated on a cluster level only. 

Workloads Level

The workloads level shows details on applications that are running in Kubernetes Cluster like Cron jobs that are scheduled, Daemon sets, deployments, jobs and pods usage with time. 

The workloads level can be used to monitor the pods closely and increase or decrease the configurations (Hardware) of pods if necessary to avoid high costs or sudden overload. 

Namespace Level

The Kubernetes dashboard also offers to monitor the resources on a namespace level. This gives a real insight into how much resource utilization is happening on a namespace level. If needed we can create extra pods if the consumption is too high or we can shift pods into a different namespace depending on the utilization. 

We have a complete course on DevOps, to learn more about technologies used in DevOps.

Deploying Containerized Applications

With the help of the Kubernetes dashboard, we can directly deploy the containerized applications without using the Command Line Interface. 

You can either manually specify application details, or upload a YAML or JSON manifest file containing application configuration. 

  • Step 1: Click on the Create button on top left of the Welcome Page. 
  • Step 2: You are required to fill the configurations of the applications. 
  • App Name- Name for your Application 
  • Container Image - The URL of the Docker image from the private registry or from dockerhub if its public 
  • Number of Pods - The number of pods required(Based on the requirement) 
  • Service - This is an optional field. If you want to expose some parts of your application for external services. You can specify it here. 
  • Step 3: Advanced Configurations.

Description: Description of the application that you are going to deploy 

Labels- Labels can be additional information about the application’s deployment for example (

release=1.0 
tier=frontend 
environment=pod 
track=stable 
) 
  • Namespace- Namespaces are virtual cluster which lets you partition the cluster into logical groups. 
  • Image pull secret - If the specified Docker image is private, it would need the image pull secrets. 
  • CPU requirement : You can specify the minimum resource limits  for the container.  
  • Run command and Run command arguments: You can use the command options and arguments to override the starting point of the docker container 
  • Run as privileged:  This setting can be used to set the privileges for the container 
  • Environment variables: It is also possible to pass environment variables from the dashboard using this config

Uploading a YAML or JSON file

As an alternative, all the configurations can also be mentioned in the form of YAML or JSON and can be uploaded to the cluster using the dashboard UI. 

Using Dashboard

The following sections describe various sections present in the Kubernetes dashboard UI. 

Admin overview

This section depicts the overall cluster and node information. It gives an overview from a higher level of consumption of resources, services and pods. 

Workloads

It shows all the applications running in a particular namespace. This view goes into much detail like Deployments, ReplicaSets and StatefulSets. Each Workload can be viewed separately. 

Services

This section lists all the services that are exposed from the Kubernetes cluster for internal bindings. 

Storage

This section lists all the StorageVolumeclaim used by the Kubernetes resources for storing data within the Kubernetes cluster. 

ConfigMaps and Secrets

This section shows all the live configs that are actively used by the Kubernetes cluster. It also shows the environment variables(secrets) defined in the Kubernetes cluster. 

Logs viewer

As the name suggests, this section is used to view logs on a pod level as well as on a cluster level. 

Conclusion

In this blog, we have discussed how to set up Kubernetes Dashboard using CLI as well as using helm charts. We discussed the various functionalities as well as the sections that the dashboard offers. The dashboard can also be used to directly deploy containers in Kubernetes. You can also refer to these links to learn more about K8s and K8s dashboard. Check out the Best Course for Docker and Kubernetes offered by KnowledgeHut

Additional Resources

  • https://github.com/kubernetes/dashboard  
  • https://kubernetes.io/docs/tasks/access-application-cluster/web-ui-dashboard/  
  • https://docs.aws.amazon.com/eks/latest/userguide/dashboard-tutorial.html  
  • https://artifacthub.io/packages/helm/k8s-dashboard/kubernetes-dashboard 

Frequently Asked Questions (FAQs)

1. How do you deploy a Kubernetes Dashboard?

2. Is there a GUI for Kubernetes?

3. How do I access Kubernetes Dashboard externally?

Mayank Modi

86 articles published

Get Free Consultation

+91

By submitting, I accept the T&C and
Privacy Policy

Suggested Blogs