< img height="1" width="1" style="display:none;" alt="" src="https://px.ads.linkedin.com/collect/?pid=3131724&fmt=gif" />

Reset User Password

This section provides guidance on resetting user passwords.

If a regular user forgets their password and is unable to log in to the KubeSphere web console, please refer to this document for instructions on how the administrator can change the user’s password.

If the platform administrator forgets their password, the following command needs to be executed on the host cluster to change the password for the specified account.

kubectl patch users <USERNAME> -p '{"spec":{"password":"<YOURPASSWORD>"}}' --type='merge' && kubectl annotate users <USERNAME> iam.kubesphere.io/password-encrypted-
Note

Please replace <USERNAME> in the command with the actual username and <YOURPASSWORD> with the new password.

Attention

The new password <YOURPASSWORD> must meet the password requirements. It must contain at least one number, one lowercase letter, one uppercase letter, and one special character (~!@#$%^&*()-_=+|[{}];:'",<.>/? or space). The length must be 8 to 64 characters.

Example:

kubectl patch users admin -p '{"spec":{"password":"P@88w0rd"}}' --type='merge' && kubectl annotate users admin iam.kubesphere.io/password-encrypted-

Receive the latest news, articles and updates from KubeSphere


Thanks for the feedback. If you have a specific question about how to use KubeSphere, ask it on Slack. Open an issue in the GitHub repo if you want to report a problem or suggest an improvement.

What’s on this Page