Skip to content

mkectl reset-password

mkectl reset-password#

Reset a local user's password using only the cluster-admin kubeconfig

Synopsis#

Reset the password of the local user named by --user directly in the cluster. Requires only a cluster-admin kubeconfig. By default a new password is generated and printed exactly once; use --interactive or --password-stdin to supply one instead. The user's refresh tokens and offline sessions are revoked unless --skip-session-revocation is given. A supplied password must be 8 to 64 characters long and contain no white spaces. Asks for confirmation first; --force skips the prompt, and --password-stdin never prompts so it stays usable in automation. Note that ID tokens already issued remain valid until they expire.

mkectl reset-password [flags]

Options#

      --force                     bypass the confirmation prompt
  -h, --help                      help for reset-password
      --interactive               prompt for the new password instead of generating one
      --password-stdin            read the new password from stdin instead of generating one
      --skip-session-revocation   do not delete the user's dex refresh tokens and offline sessions
      --user string               local user whose password to reset (required)

Options inherited from parent commands#

  -f, --file string              path to the config file. Not needed for restore where config is loaded from the backup (default "mke4.yaml")
      --kubeconfig string        path to the kubeconfig file of the existing or restored cluster. DO NOT USE when creating a new cluster (default "/home/runner/.mke/mke.kubeconf")
  -l, --logLevel string          specify a log level (info, warn, debug, trace, error) (default "info")
      --no-color                 when provided, disables colored output
      --no-pretty-print          when provided, disables pretty print output formatting
      --version version[=true]   --version, --version=raw prints version information and quits; --version=vX.Y.Z... sets the reported version