Configuring Kubernetes Dashboard Service

Configuring Kubernetes Dashboard Service
Written by Haribabu MannamMay 12, 2020
2 min read
DevOps
25 VIEWS 1 LIKES 1 DISLIKES SHARE
1 LIKES 1 DISLIKES 25 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
25 VIEWS 1 LIKES 1 DISLIKES SHARE
1 LIKES 1 DISLIKES 25 VIEWS SHARE
Was this blog helpful?
You must be Logged in to comment
Code Block

1 Comments

Maria Gilbert

Nice Blog

Haribabu Mannam
4 Blog Posts
0 Discussion Threads
Trending Categories
93
Software12
DevOps34
Frontend Development13
Backend Development13
Server Administration13
Linux Administration12
Data Center14
Sentry11
Terraform15
Ansible9
Docker13
Penetration Testing12
Kubernetes12
NGINX8
JenkinsX10
Jenkins18
SSL6
Ethical-Hacking10
Python8
NodeJs9
RedHat8
Github11
AngularJs15
Google Cloud Platform (GCP)6
SonarQube9
Amazon Web Service (AWS)2
VMware17
Blockchain6
Snipe-IT7