Configuring Kubernetes Dashboard Service

Configuring Kubernetes Dashboard Service
Written by Haribabu MannamMay 12, 2020
2 min read
DevOps
24 VIEWS 1 LIKES 0 DISLIKES SHARE
1 LIKES 0 DISLIKES 24 VIEWS SHARE
Haribabu Mannam

Configuring Kubernetes Dashboard Service

Deploying Dashboard Service in kubernates Master

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

Verifying Dashboard Service

kubectl get svc -n kubernetes-dashboard

Change ClusterIP to NodePort ( for exposing port externally)

kubectl get svc -n kubernetes-dashboard -o yaml | sed 's/type: ClusterIP/type: NodePort/' | kubectl replace -f -

Adding Service account for logged Dashboard service

kubectl create serviceaccount cluster-admin-dashboard-sa

Bind ClusterAdmin role to the service account

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

Parse the token (for logged dashboard using token )

TOKEN=$(kubectl describe secret $(kubectl -n kube-system get secret | awk '/^cluster-admin-dashboard- sa-token-/{print $1}') | awk '$1=="token:"{print $2}')

Copy token by using below command

echo $TOKEN

Use below url for accessing Dashboard in browser and use above token for logged into it

https:<ipaddress-master> : <nodeport>


Docker
kubernetes
Devops
Kubernetes Dashboard
Master-slave
24 VIEWS 1 LIKES 0 DISLIKES SHARE
1 LIKES 0 DISLIKES 24 VIEWS SHARE
Was this blog helpful?
You must be Logged in to comment
Code Block
Haribabu Mannam
4 Blog Posts
0 Discussion Threads
Trending Categories
37
Software1
DevOps15
Frontend Development4
Backend Development2
Server Administration1
Linux Administration5
Data Center0
Sentry0
Terraform2
Ansible0
Docker3
Penetration Testing0
Kubernetes0
NGINX0
JenkinsX0
Jenkins2
SSL0
Ethical-Hacking1
Python0
NodeJs1
RedHat0
Github0
AngularJs0
Google Cloud Platform (GCP)0
SonarQube0
Amazon Web Service (AWS)0
VMware0
Blockchain0
Snipe-IT1
MongoDB0