Upgrading operators using the CLI

Upgrade operators using the CLI. To upgrade using the OpenShift web console, see Upgrading operators by using the OpenShift web console.

This task must be performed by an OpenShift cluster administrator. For more information, see OpenShift roles and permissions.

Before you begin

Confirm that you have completed all tasks prior to upgrading the operators, according to your upgrade plan in "Upgrading the operators" section of Upgrading from 2022.2 or Upgrading from 2023.4.

Procedure

Upgrading between major release versions of Cloud Pak for Integration requires a change of operator channel, which is always a manual step for the user. To confirm what channel you need to change to, see Operator and instance versions for this release.

To upgrade the operator channel:

  1. Log in to the OpenShift cluster:

    oc login --username=<cluster admin user> --password=<cluster admin password>
  2. Set the default project (namespace) as the one that contains the operator to be upgraded. For All namespaces on the cluster mode, this must be openshift-operators:

    oc project <namespace>
  3. Get a list of all the subscriptions in this project/namespace:

    oc get subscriptions

    This returns the list of subscriptions in the namespace:

    NAME                                                                                              PACKAGE                                SOURCE                                         CHANNEL
    datapower-operator                                                                                datapower-operator                     datapower-operator-catalog                     v1.6
    ibm-apiconnect                                                                                    ibm-apiconnect                         ibm-apiconnect-catalog                         v3.0
    ibm-appconnect                                                                                    ibm-appconnect                         ace-operators                                  v4.0
    ibm-common-service-operator-v3-opencloud-operators-openshift-marketplace                          ibm-common-service-operator            opencloud-operators                            v3
    ibm-eventstreams                                                                                  ibm-eventstreams                       ibm-eventstreams-catalog                       v2.5
    ibm-integration-asset-repository                                                                  ibm-integration-asset-repository       ibm-integration-asset-repository-catalog       v1.4
    ibm-integration-operations-dashboard                                                              ibm-integration-operations-dashboard   ibm-integration-operations-dashboard-catalog   v2.6-lts
    ibm-integration-platform-navigator-v6.0-pn-operators-openshift-marketplace                        ibm-integration-platform-navigator     pn-operators                                   v6.0
    ibm-mq                                                                                            ibm-mq                                 ibm-mq-operator-catalog                        v1.8

    For the information that is returned, identify the subscription name for the operator that you need to upgrade (from the NAME column), and the corresponding package name (from the PACKAGE column).

  4. Confirm that the channel to which you want to upgrade is available. To get the available operator channel versions for this release, see Operator and instance versions for this release. Replace <package-name> in the command below, using the information returned in the previous step:

    oc get packagemanifest <package-name> -o=jsonpath='{.status.channels[*].name}'

    The command returns a list of channels. Confirm that the channel to which you want to upgrade is available.

  5. Patch the subscription to move to the desired upgrade channel, replacing <subscription-name> and <channel> in the command below.

    Attention: When the IBM Event Streams operator is upgraded, all Kafka clusters managed by this operator are upgraded automatically.
    Important: To trigger upgrade for the API Connect and DataPower operators, make sure to change the channel value for both operators.
    oc patch subscription <subcription-name> --patch '{"spec":{"channel":"<channel>"}}' --type=merge

    For example:

    oc patch subscription ibm-integration-platform-navigator-v6.0 --patch '{"spec":{"channel":"v7.3-sc2"}}' --type=merge
  6. After a few minutes, the operator is upgraded. To confirm successful upgrade, re-run this command and check that the channel is correct:

    oc get subscriptions

After all the operators being used are upgraded, you can upgrade the instances.