View the current Kubernetes admin password

kubectl config view

 

Change the password

Update the password in this file (it’s the first value):

/var/snap/microk8s/current/credentials/basic_auth.csv

 

Execute the following command:

kubectl config set-credentials admin --password=new_password

Note:  Replace “new_password” with the new password that you have set in the basic_auth.csv file.

 

Restart the API server:

sudo systemctl restart snap.microk8s.daemon-apiserver

 

You can use the new password to log in to the Kubernetes dashboard.

 

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.