Change a user name and password for a bare-metal host
This section describes how to change a user name and password of a bare-metal
host using an existing BareMetalHostCredential object.
To change a user name and password for a bare-metal host:
Open the
BareMetalHostCredentialobject of the required bare-metal host for editing.In the
specsection:Update the
usernamefieldReplace
password.name: <secretName>withpassword.value: <hostPasswordInPlainText>
For example:
spec: username: admin password: value: superpassword
This action triggers creation of a new
Secretobject with updated credentials. After that, sensitivepassworddata is replaced with the newSecretobject name. For a detailed workflow description, see BareMetalHostCredential resource.Caution
Adding a password value is mandatory for a user name change. You can either create a new password value or copy the existing one from the related
Secretobject.Caution
Changing a user name in the related
Secretobject does not automatically update theBareMetalHostCredentialobject. Therefore, Mirantis recommends updating credentials only using the theBareMetalHostCredentialobject.Warning
The
kubectl applycommand automatically saves the applied data as plain text into thekubectl.kubernetes.io/last-applied-configurationannotation of the corresponding object. This may result in revealing sensitive data in this annotation when creating or modifying the object.Therefore, do not use
kubectl applyon this object. Usekubectl create,kubectl patch, orkubectl editinstead.If you used
kubectl applyon this object, you can remove thekubectl.kubernetes.io/last-applied-configurationannotation from the object usingkubectl edit.