
In a distributed system environment (microservices) there must be a lot of services running, which can reach tens, hundreds or even millions of services. With that many services, it must be very difficult if we manage it manually. By using Kubernetes (k8s) we can manage these services automatically (orchestration). By default kubernetes works using the command line, and does not use the User Interface, for monitoring needs it must be very useful if there is a UI that provides metrix data etc about kubernetes. For that, in this article, the author will show you how to install the Kubernetes dashboard.
Prerequisites
- Docker Dekstop
- Kubernetes Installed
- Stable Internet Connection
In this case, the author uses the Windows 10 desktop Docker in which Kubernetes is installed.
Okay, let’s get straight to it, here are the steps to install the Kubernetes dashboard:
Make sure that Kubernetes is installed. In Docker Desktop, go to the Kubernetes menu and settings section, then tick Kubernetes. This process takes time because docker desktop will download the requirements first. Make sure that Kubernetes is running normally by looking at the green Kubernetes indicator icon.

Install Kubernetes Dashboard Open the powershell application and type the following command.
kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.2.0/aio/deploy/recommended.yaml
This command is used to download the deployment manifest and set up your local cluster. And more or less you will see output like this.
namespace/kubernetes-dashboard created
serviceaccount/kubernetes-dashboard created
service/kubernetes-dashboard created
...
service/dashboard-metrics-scraper created
deployment.apps/dashboard-metrics-scraper created
and if you look at the docker desktop dashboard, it will more or less look like this

How to Disable login prompt when accessing K8S Dashboard
kubernetes dashboard allows you to bypass logins by using the extra argument — enable-skip-login
Open Powershell with Run with Administrator mode and execute the following command
kubectl patch deployment kubernetes-dashboard -n kubernetes-dashboard --type 'json' -p '[{"op": "add", "path": "/spec/template/spec/containers/0/args/-", "value": "--enable-skip-login"}]'
Next, try opening the following command
kubectl proxy
After the k8s dashboard is running then access this link to access the k8s dashboard.
http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/
you can click skip button

and finally you can access k8s dashboard



If it was interesting or helpful to you, please do press the 👏 clap button and help others find this story too or if you wanna talk internally with me , reach me in https://linktr.ee/teten_nugraha.

所有评论(0)