Modifying default credentials for NPS toolkit Web API server

The default username and the default password for the NPS toolkit Web API server are provided in the nps_secret.yaml file. These default credentials are passed to the Kubernetes cluster using the nps_secret.yaml file. Hewlett Packard Enterprise recommends you to modify the default values before installing the NPS toolkit Web API server.

Prerequisites
  • Ensure that you are logged in to the NPS toolkit VM as the root user.

  • In this procedure, the nps_secret.yaml file is available in the /root/nps2/install/ directory.

Procedure
  1. To encrypt the default username and password as a base-64 encoded strings, run the following commands with the user-defined username and password:
    echo -n "<name of user>" | base64
    echo -n "<password of user>" | base64
  2. Edit the nps_secret.yaml file and manually replace the default username and password with the base-64 encoded string. For example:
    vi nps_secret.yaml 
    apiVersion: v1
    kind: Secret
    metadata:
      name: npskey
      namespace: nps
    type: Opaque
    data:
      username: <Enter the base-64 encoded string of username>
      password: <Enter the base-64 encoded string of password>
    NOTE:

    For more information about creating and using the Kubernetes secret objects, see Kubernetes Documentation.