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 a cluster administrator. For more information, see Roles and permissions.

Be sure to upgrade the operators at the appropriate step in Upgrading from 2022.2.

Important: Both the API Connect and DataPower channels must be changed before either operator upgrades. The upgrade of both operators begins when the channel is changed for both operators.

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 channel versions for this release.

To upgrade the operator channel:

  1. Log in to the OpenShift Container Platform cluster:

    oc login --username=<cluster admin user> --password=<cluster admin password>
  2. Set the default project (namespace) to be 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 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 channel versions for this release. Replace <package-name> in the command below, using the information you got in the previous step:

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

    The command will return 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:

    oc patch subscription <subcription-name> --patch '{"spec":{"channel":"<channel>"}}' --type=merge

    For example:

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

    oc get subscriptions

Once all the operators being used are upgraded, you can upgrade the capabilities.