Installing the External Secrets Operator for Red Hat OpenShift by using the CLI

You can install the External Secrets Operator for Red Hat OpenShift by manually configuring the Operator Lifecycle Manager (OLM) resources using the OpenShift CLI. You can create a dedicated namespace, define the Operator’s scope, and install the Operator from the catalog.

Prerequisites
  • You have access to the cluster with cluster-admin privileges.

Procedure
  1. Create a new project named external-secrets-operator by running the following command:

    $ oc new-project external-secrets-operator
  2. Create an OperatorGroup object by defining a YAML file with the following content:

    apiVersion: operators.coreos.com/v1
    kind: OperatorGroup
    metadata:
      name: openshift-external-secrets-operator
      namespace: external-secrets-operator
    spec:
      targetNamespaces: []
  3. Create the OperatorGroup object by running the following command:

    $ oc create -f operatorGroup.yaml
  4. Create a Subscription object by defining a YAML file with the following content:

    The following is an example of a subscription.yaml file.

    apiVersion: operators.coreos.com/v1alpha1
    kind: Subscription
    metadata:
      name: openshift-external-secrets-operator
      namespace: external-secrets-operator
    spec:
      channel: stable-v1
      name: openshift-external-secrets-operator
      source: redhat-operators
      sourceNamespace: openshift-marketplace
      installPlanApproval: Automatic
      startingCSV: external-secrets-operator.v1.0.0
  5. Create the Subscription object by running the following command:

    $ oc create -f subscription.yaml
Verification
  1. Verify that the OLM subscription is created by running the following command:

    $ oc get subscription -n external-secrets-operator

    The following is example output verifying the OLM subscription is created.

    NAME                                  PACKAGE                               SOURCE             CHANNEL
    openshift-external-secrets-operator   openshift-external-secrets-operator   redhat-operators   stable-v1
  2. Verify whether the Operator is successfully installed by running the following command:

    $ oc get csv -n external-secrets-operator

    The following is example output verifying that the Operator is installed.

    NAME                               DISPLAY                                           VERSION   REPLACES   PHASE
    external-secrets-operator.v1.0.0   External Secrets Operator for Red Hat OpenShift   1.0.0                Succeeded
  3. Verify that the status of the External Secrets Operator is Running by entering the following command:

    $ oc get pods -n external-secrets-operator

    The following is example output verifying the External Secrets Operator is Running.

    NAME                                                            READY   STATUS    RESTARTS   AGE
    external-secrets-operator-controller-manager-5699f4bc54-kbsmn   1/1     Running   0          25h