How do I create a service account for my dashboard and get all the credentails

0 votes
I have set up a cluster, Now i'm trying to figure out how to create an account on the dashboard and how do I get the token value and the credentials?

Thank you..
Oct 8, 2018 in Kubernetes by lina
• 8,220 points
1,704 views

1 answer to this question.

0 votes

Run the following commands:

This command will create a service account for a dashboard in the default namespace

kubectl create serviceaccount dashboard -n default

Add the cluster binding rules to your dashboard account

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

For detailed explaination, follow the instructions on this blog.

answered Oct 8, 2018 by Kalgi
• 52,350 points

Related Questions In Kubernetes

0 votes
2 answers

How do I update all my pods if the image is changed but the tag is the same?

since K8s 1.15 kubectl rollout restart do the ...READ MORE

answered Jul 24, 2020 in Kubernetes by Mathieu V
7,185 views
0 votes
1 answer

How do I expose a service to a host outside the cluster?

There are two ways by which we ...READ MORE

answered Jul 12, 2019 in Kubernetes by Sirajul
• 59,230 points
798 views
0 votes
1 answer

How can i get all the pods on a node?

You can use the following command to ...READ MORE

answered Jul 12, 2019 in Kubernetes by Sirajul
• 59,230 points
1,066 views
+1 vote
1 answer
0 votes
3 answers

Error while joining cluster with node

Hi Kalgi after following above steps it ...READ MORE

answered Jan 17, 2019 in Others by anonymous
15,456 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,024 views
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP