How to Deploy and Access the Kubernetes Dashboard
Learn the basics of Kubernetes Dashboard with Weaveworks including how to deploy, access, and use a dashboard.
Cluster Ready Checklist for Kubernetes
Optimizing Kubernetes Resource Limits for Team Development
Optimizing Kubernetes Cluster Resource Limits
How To Optimize Kubernetes ReplicaSets
Today, most organizations are running containerized workloads in production. To orchestrate hundreds of containers that host services that make up distributed applications, organizations have had to turn to orchestration tools like Kubernetes. Today, Kubernetes is the hottest trend in the IT world. However, Kubernetes-based workloads are plagued with complexity and can be hard to monitor and debug. Several third-party dashboards usually do the trick. However, recently, Kuberenetes’ dashboard has been made generally available.
What is the Kubernetes Dashboard?
Kubernetes dashboard is a web-based UI that allows users to monitor clusters and resources. With Dashboard, users can deploy clusters, manage resources, and troubleshoot applications in case of an error. Users can also create and modify individual Kubernetes resources, scale deployment on the go, initiate rolling updates, and restart faulty pods. These tools allow developers to visualize errors instantly so they can quickly work on a fix rather than waste precious time debugging their workloads.
How do you Deploy a Kubernetes Dashboard?
Kubernetes dashboard doesn’t get deployed by default; it has to be manually deployed using the following kubectl command:
kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.5.0/aio/deploy/recommended.yaml
Once successfully deployed, users can validate the deployment using the following command:
kubectl get all -n kubernetes-dashboard
How do you Access a Kubernetes Dashboard?
The dashboard gets installed with the least possible privilege by default for security reasons. Users can create a bearer token following online tutorials to access the dashboard. Users, however, should try to take a zero-trust approach to dashboard access and ensure unauthorized access isn’t possible. Users can run the following kubectl command to access the dashboard.
By default, kubectl makes the dashboard available at the following port:
Using the kubectl proxy or kubectl port-forward, users can access the dashboard only from the kubectl machine. At the same time, other methods like Kubernetes Service and Ingress Control don’t have such limitations.
Tips for Using the Dashboard
The dashboard is quite vast and has a lot of incredible features. Let’s look at some of the different sections of the Kubernetes dashboard.
The dashboard allows teams to look at all their Kubernetes objects at a glance. All the defined Kubernetes objects are visible on the dashboard’s initial view. By default, only the objects declared in the default namespace are visible. Still, users can view objects in other namespaces by simply selecting the relevant namespace in the namespace selector available in the navigation menu. Kubernetes objects are placed under various menu categories, making it easier for developers to find the proper object, thereby organizing things.
The Kubernetes Dashboard is a convenient tool for cluster and namespace administrators. Providing admins with a list view of all the nodes, namespaces, and persistent volumes ensures they are always aware of new Kubernetes objects. The node list view provides information regarding the CPU and memory usage metrics that can provide necessary insight to the admins. For a detailed look into each node, the detailed view provides information like allocated resources, status, specification, and events and pods running on a particular node. All this information can help admins make informed decisions to fine-tune the workloads.
Users can see all the apps running under a specific namespace within the dashboard. The workload view shows all the workloads in different categories based on the kind of workloads. The workloads are categorized into three categories, namely Deployment, ReplicaSets, and StatefulSets. Users can view all workloads in a specific category separately. The list view provides actionable information regarding the workloads, like the number of pods ready for ReplicaSets and memory usage for a particular pod.
The detailed view provides more information like specification, status, and surface relation between different objects in a workload. Other details on pods that ReplicaSets control, new ReplicaSets, and HorizontalPodAutoscalers for deployment are also easily accessible to teams.
The dashboard also provides info regarding Kubernetes resources that expose services to external users and help make them discoverable for integrations. The service and ingress view detail pods targeted by the services and their internal and external endpoints provide more visibility into the workloads.
This view provides information regarding resources using the PersitentVolumeClain to store application data.
1. Does Kubernetes Have a GUI?
The Kubernetes dashboard has a GUI; to use this, teams have to access the default port once the dashboard is installed using kubectl.
2. What is Kubernetes UI?
The Kubernetes UI or Kubernetes Dashboard is a web-based user interface that allows teams to visualize their Kubernetes workloads and their various components. Teams can use this UI to stay up to date with their Kubernetes objects and their performance.
3. What Port Does the Kubernetes Dashboard run on?
By default, the Kubernetes dashboard runs on the following port after installation:
4. How do you Make Kubernetes Dashboard Accessible From Outside?
To make the dashboard accessible from outside, admins can create a bearer token that the admin can share with the authorized personnel or via Kubernetes Service or the Ingress controller to access it from outside (machines not used to install the dashboard).
Kubernetes is constantly evolving, and innovation is happening at a rapid pace. Keeping up with new tools and features can be tricky. If you’re looking for more resources to learn about Kubernetes and all that’s cloud-native, visit our Resource Center.
We’re in the business of helping teams adopt and manage cloud-native infrastructure and applications through our GitOps solutions: Weave GitOps and Weave GitOps Enterprise. Our experts would be more than happy to help. Contact us today.