Install Kubernetes Dashboard on Docker Desktop for Windows

On a Windows 10 machine, the easiest way to install a Kubernetes environment is using Docker Desktop for Windows. The installer is available here.

After installing Docker Desktop (for Windows or Mac), we need to enable Kubernetes from the Settings option.

In the settings window, lets select the Kubernetes tab and enable enable the Kubernetes option.

That's all! It may take a minute to restart docker and get Kubernetes up and running.

Next is to install the Kubernetes Dashboard. The Dashboard is a web based Kubernetes inferface that we can use to manage the cluster including deploy new containers, view Pod status and the like.

Step 1: Deploy the Dashboard app

kubectl apply -f

Step 2: Start the proxy to expose the port locally

kubectl proxy

Now, if you browse the dashboard url: http://localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/
it will show the following page:

That's because we need to configure the security settings. Run the following two commands to generate the kubeconfig file.

$TOKEN=((kubectl -n kube-system describe secret default | Select-String "token:") -split " +")[1]

kubectl config set-credentials docker-for-desktop --token="${TOKEN}"

The file is now available at C:\Users.kube\config. Choose this file and click Sign In. You will see a dashboard similar to this:

Show Comments