Configuring Kubernetes Dashboard Service

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

1 Comments

Maria Gilbert

Nice Blog

Techiio

Techiio is on the journey to build an ocean of technical knowledge, scouring the emerging stars in process and proffering them to the corporate world.

Follow us on:

facebooklinkdeintwitter

Subscribe to get latest updates

You can unsubscribe anytime from getting updates from us
Copyright techiio.com @2020 Kolkata, India
made with by Abhishek & Priyanka Jalan
Copyright techiio.com @2020
made with by Abhishek & Priyanka Jalan