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:

  1. Open the BareMetalHostCredential object of the required bare metal host for editing.

  2. In the spec section:

    • Update the username field

    • Replace <secretName> with password.value: <hostPasswordInPlainText>

    For example:

      username: admin
        value: superpassword

    This action triggers creation of a new Secret object with updated credentials. After that, sensitive password data is replaced with the new Secret object name. For a detailed workflow description, see API Reference: BareMetalHostCredential.


    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 Secret object.


    Changing a user name in the related Secret object does not automatically update the BareMetalHostCredential object. Therefore, Mirantis recommends updating credentials only using the the BareMetalHostCredential object.


    The kubectl apply command automatically saves the applied data as plain text into the annotation 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 apply on this object. Use kubectl create, kubectl patch, or kubectl edit instead.

    If you used kubectl apply on this object, you can remove the annotation from the object using kubectl edit.