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.
Comments
0 comments