Adding the IBM operator catalog and preparing the cluster
The IBM operator catalog is an index of operators available to automate deployment and maintenance of IBM Software products into Red Hat OpenShift Container Platform clusters. Add the IBM operator catalog to any Red Hat OpenShift Container Platform 4.14 and newer cluster by applying the CatalogSource resource.
On Red Hat OpenShift Container Platform 4.9 and later clusters, the
olm.catalogImageTemplate
annotation is used to switch the catalog tag from
latest
to a different tag based on the Kubernetes version used by the cluster.
Setting the annotation causes the catalog to automatically switch to a catalog that is compatible
with the cluster whenever the cluster is updated to a new Kubernetes version. For example, for Red Hat OpenShift Container Platform 4.9, the tag updates to v1.22
instead of
latest
.
opm
command-line utility with deprecated subcommands and flags that require the
SQLITE format fail, such as opm index prune
. For more information about working
with custom, file-based catalogs, see the Red Hat OpenShift Container Platform 4.14 documentation
openshift-marketplace
namespace, you must
have cluster admin access. If you deploy the catalog to another IBM Cloud Pak-specific namespace, only namespace admin access is
required.- Creating CatalogSource with Red Hat OpenShift
- 1. Log in to your Red Hat OpenShift Container Platform cluster.
- Click CatalogSource. , then select
- Click Create CatalogSource.
- In the CatalogSource name field, enter
ibm-operator-catalog
. - In the Publisher name field, enter
IBM
. - In the Image (URL of container image) field, enter
icr.io/cpopen/ibm-operator-catalog:latest
. - Under Availability, select the Cluster-wide
CatalogSource option.
You can verify successful CatalogSource creation by going into the OperatorHub where the IBM Operator Catalog now exists as a source value. You are also provided with a confirmation after the CatalogSource value is completed in Red Hat OpenShift Container Platform. It can sometimes take approximately 5 minutes for the CatalogSource to appear in OperatorHub after successful completion.
- CLI enablement
The catalog can be added by applying the following YAML file to the Red Hat OpenShift Container Platform cluster. Create this file and name it catalog_source.yaml.
apiVersion: operators.coreos.com/v1alpha1 kind: CatalogSource metadata: name: ibm-operator-catalog namespace: openshift-marketplace annotations: olm.catalogImageTemplate: "icr.io/cpopen/ibm-operator-catalog:v{kube_major_version}.{kube_minor_version}" spec: displayName: IBM operator Catalog publisher: IBM sourceType: grpc image: icr.io/cpopen/ibm-operator-catalog:latest updateStrategy: registryPoll: interval: 45m
Apply the YAML file by using the command:
oc apply -f catalog_source.yaml -n openshift-marketplace
- Verify the CLI
installation
oc get CatalogSources ibm-operator-catalog -n openshift-marketplace
You receive this output on error:
Error from server (NotFound): catalogsources.operators.coreos.com "ibm-operator-catalog" not found
You receive this output on success:
NAME DISPLAY TYPE PUBLISHER AGE ibm-operator-catalog IBM operator Catalog grpc IBM 28s