Installing the cert-manager Operator for Red Hat OpenShift by using the CLI
You can install the cert-manager Operator for Red Hat OpenShift by using the command-line interface (CLI).
-
You have access to the cluster with
cluster-adminprivileges.
-
Create a new project named
cert-manager-operatorby running the following command:$ oc new-project cert-manager-operator -
Create an
OperatorGroupobject:-
Create a YAML file, for example,
operatorGroup.yaml, with the following content:apiVersion: operators.coreos.com/v1 kind: OperatorGroup metadata: name: openshift-cert-manager-operator namespace: cert-manager-operator spec: targetNamespaces: - "cert-manager-operator" -
For cert-manager Operator for Red Hat OpenShift v1.15.0 or later, create a YAML file with the following content:
apiVersion: operators.coreos.com/v1 kind: OperatorGroup metadata: name: openshift-cert-manager-operator namespace: cert-manager-operator spec: targetNamespaces: [] spec: {}Starting from cert-manager Operator for Red Hat OpenShift version 1.15.0, it is recommended to install the Operator using the
AllNamespacesOLMinstallMode. Older versions can continue using theSingleNamespaceorOwnNamespaceOLMinstallMode. Support forSingleNamespaceandOwnNamespacewill be deprecated in future versions. -
Create the
OperatorGroupobject by running the following command:$ oc create -f operatorGroup.yaml
-
-
Create a
Subscriptionobject:-
Create a YAML file, for example,
subscription.yaml, that defines theSubscriptionobject:apiVersion: operators.coreos.com/v1alpha1 kind: Subscription metadata: name: openshift-cert-manager-operator namespace: cert-manager-operator spec: channel: stable-v1 name: openshift-cert-manager-operator source: redhat-operators sourceNamespace: openshift-marketplace installPlanApproval: Automatic -
Create the
Subscriptionobject by running the following command:$ oc create -f subscription.yaml
-
-
Verify that the OLM subscription is created by running the following command:
$ oc get subscription -n cert-manager-operatorExample outputNAME PACKAGE SOURCE CHANNEL openshift-cert-manager-operator openshift-cert-manager-operator redhat-operators stable-v1 -
Verify whether the Operator is successfully installed by running the following command:
$ oc get csv -n cert-manager-operatorExample outputNAME DISPLAY VERSION REPLACES PHASE cert-manager-operator.v1.13.0 cert-manager Operator for Red Hat OpenShift 1.13.0 cert-manager-operator.v1.12.1 Succeeded -
Verify that the status cert-manager Operator for Red Hat OpenShift is
Runningby running the following command:$ oc get pods -n cert-manager-operatorExample outputNAME READY STATUS RESTARTS AGE cert-manager-operator-controller-manager-695b4d46cb-r4hld 2/2 Running 0 7m4s -
Verify that the status of cert-manager pods is
Runningby running the following command:$ oc get pods -n cert-managerExample outputNAME READY STATUS RESTARTS AGE cert-manager-58b7f649c4-dp6l4 1/1 Running 0 7m1s cert-manager-cainjector-5565b8f897-gx25h 1/1 Running 0 7m37s cert-manager-webhook-9bc98cbdd-f972x 1/1 Running 0 7m40s