Creating an array secret
Create a storage system secret in order to define the storage credentials (username and password) and address.
|
Important: When your storage system password is changed, be sure to also change the
passwords in the corresponding secrets, particularly when LDAP is used on the storage
systems.
Failing to do so causes mismatched passwords across the storage systems and the secrets, causing the user to be locked out of the storage systems. |
- Creating an array secret file
-
- Create the secret
file.
kind: Secret apiVersion: v1 metadata: name: <NAME> namespace: NAMESPACE type: Opaque stringData: management_address: <ADDRESS-1, ADDRESS-2> # replace with valid storage system management address username: <USERNAME> # replace with valid username data: password: <PASSWORD base64> # replace with base64 encoding of valid password - Apply the secret using the following
command:
$> kubectl apply -f array-secret.yamlThe
secret/<NAME> createdmessage is emitted.
- Create the secret
file.
- Creating an array secret via command line
-
Create the secret using the following command:Note: This procedure is applicable for both Kubernetes and Red Hat OpenShift. For Red Hat OpenShift, replace kubectl with oc in all relevant commands.
kubectl create secret generic <NAME> --from-literal=username=<USER> --from-literal=password=<PASSWORD>--from-literal=management_address=<ARRAY_MGMT> -n <namespace>