1.2. Installing the OpenShift Pipelines Operator by using the CLI
You can install Red Hat OpenShift Pipelines Operator from OperatorHub by using the command-line interface (CLI).
Procedure
Create a
Subscriptionobject YAML file to subscribe a namespace to the Red Hat OpenShift Pipelines Operator, for example,sub.yaml:Example
SubscriptionYAMLapiVersion: operators.coreos.com/v1alpha1 kind: Subscription metadata: name: openshift-pipelines-operator namespace: openshift-operators spec: channel: <channel_name>1 name: openshift-pipelines-operator-rh2 source: redhat-operators3 sourceNamespace: openshift-marketplace4 - 1
- Name of the channel that you want to subscribe. The
pipelines-<version>channel is the default channel. For example, the default channel for Red Hat OpenShift Pipelines Operator version1.7ispipelines-1.7. Thelatestchannel enables installation of the most recent stable version of the Red Hat OpenShift Pipelines Operator. - 2
- Name of the Operator to subscribe to.
- 3
- Name of the
CatalogSourceobject that provides the Operator. - 4
- Namespace of the
CatalogSourceobject. Useopenshift-marketplacefor the default OperatorHub catalog sources.
Create the
Subscriptionobject by running the following command:$ oc apply -f sub.yamlThe subscription installs the Red Hat OpenShift Pipelines Operator into the
openshift-operatorsnamespace. The Operator automatically installs OpenShift Pipelines into the defaultopenshift-pipelinestarget namespace.