Creating the htpasswd secret
Create an Red Hat OpenShift Container Platform secret from your htpasswd file so the htpasswd identity provider can read user credentials for cluster login.
Prerequisites
-
You created an
htpasswdfile.
Procedure
-
Create a
Secretobject that contains thehtpasswdusers file by running the following command:$ oc create secret generic htpass-secret --from-file=htpasswd=<path_to_users.htpasswd> -n openshift-configThe
--from-filekey must be namedhtpasswd.You can alternatively apply the following YAML to create the secret:
apiVersion: v1 kind: Secret metadata: name: htpass-secret namespace: openshift-config type: Opaque data: htpasswd: <base64_encoded_htpasswd_file_contents>