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,100 points
171 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
• 37,430 points

Related Questions In Kubernetes

0 votes
1 answer
0 votes
1 answer

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

Make sure your imagePullPolicy is set to ...READ MORE

answered Jul 12 in Kubernetes by Sirajul
• 6,360 points
26 views
0 votes
1 answer
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 in Kubernetes by Sirajul
• 6,360 points
22 views
+3 votes
1 answer
0 votes
1 answer
0 votes
3 answers

Error while joining cluster with node

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

answered Jan 17 in Others by anonymous
1,180 views
0 votes
1 answer