Adding an identity provider to your cluster

Apply the identity provider custom resource (CR) to your cluster after you define it. With this configuration, you can authenticate with the configured identity provider.

Prerequisites
  • You have access to a Red Hat OpenShift Container Platform cluster.

  • You have created the CR for your identity providers.

  • You are logged in as an administrator.

Procedure
  1. Apply the defined CR by running the following command:

    $ oc apply -f </path/to/CR>
    Note

    If a CR does not exist, oc apply creates a new CR and might trigger the following warning: Warning: oc apply should be used on resources created by either oc create --save-config or oc apply. In this case you can safely ignore this warning.

  2. Log in to the cluster as a user from your identity provider, entering the password when prompted.

    $ oc login -u <username>
  3. Confirm that the user logged in successfully and that the username displays by running the following command:

    $ oc whoami