Skip to content

Latest commit

 

History

History
48 lines (30 loc) · 1.43 KB

14-dashboard.md

File metadata and controls

48 lines (30 loc) · 1.43 KB

Dashboard configuration

In this lab you will install configure Kubernetes dashboard.

Installation

Run the following command to deploy the dashboard:

kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.0-rc5/aio/deploy/recommended.yaml

Create a proxy to the dashboard:

kubectl proxy

To access the dashboard in your web browser, click the following link: http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/#/

output A login page asking for kubeconfig file or a token

A service account and its credentials are needed to login.

Service Account creation

Create the service account with following command:

kubectl create serviceaccount dashboard -n default

Next, add the cluster binding rules to it with this command:

kubectl create clusterrolebinding dashboard-admin -n default --clusterrole=cluster-admin --serviceaccount=default:dashboard

Copy the secret token required for your dashboard login using the below command:

kubectl get secret $(kubectl get serviceaccount dashboard -o jsonpath="{.secrets[0].name}") -o jsonpath="{.data.token}" | base64 --decode

Finally, just copy the secret token and paste it in Dashboard Login interface, by selecting the token option (second radiobox). After Sign In you will be redirected to the Kubernetes Dashboard Homepage.

Next: Cleaning Up