Kubernetes Secret - turbonomic/kubeturbo GitHub Wiki
Create a Kubernetes Secret (for all deployments)
Using a Kubernetes Secret to store your Turbonomic Server credentials is the recommended method, and a secret name of turbonomic-credentials
is automatically used by default by the Kubeturbo deployment.
If a secret is created and used in your kubeturbo deployment it will take precedence over any plain text username and password defined in the
configMap
.
Once the secret is created it is available for use in any of the kubeturbo deployment methods. Remember to make note of the secret name if you are NOT using the recommended default name of
turbonomic-credentials
as it will be needed when configuring kubeturbo to use a non-default/customized secret name.
If running the OpenShift Container Platform and prefer to use the OCP console? Refer to this article here for option #2 OpenShift Console.
Before starting this section make sure you have followed all of the Username and Password Requirements section here to create the credentials in the Turbonomic Server first.
Create secret in YAML
-
Create a namespace to deploy kubeturbo into which is where you need to create the Kubernetes secret (samples provided use
turbo
) -
Create a secret with type
Opaque
and data key/value pairusername:
andpassword:
-
Here is an example with a reference yaml to create a secret.
-
This yaml example assumes your secret will be using the recommended default name of
turbonomic-credentials
, preferred as kubeturbo will automatically check for and use this secret if it exists. Modify thenamespace
value if needed.
apiVersion: v1
kind: Secret
metadata:
name: turbonomic-credentials
namespace: turbo
type: Opaque
data:
username: #####<replace with base64 encoded value>
password: #####<replace with base64 encoded value>
- The kubeturbo username and password need to be added in base64 encoded values, as in example shown below:
apiVersion: v1
kind: Secret
metadata:
name: turbonomic-credentials
namespace: turbo
type: Opaque
data:
username: a3ViZXR1cmJvCg==
password: S3ViZVR1cmJvIzEyMwo=
Create secret in OpenShift Console
- In the project where you have deployed the Kubeturbo Operator, go to Workload -> Secrets, click Create and select
Key/value secret
option.
- Add key / value pairs with the information below, in plain text, and then click Create
- Secret name: turbonomic-credentials
- Key: username
- Value: TURBOADMINUSER
- Key: password
- Value: TURBOPASSWORD
- Once created the username and password values will automatically be encoded in base64 when you view the secret after it is created.