Upgrading Portal subsystem on native Kubernetes

Upgrade the Portal subsystem to the latest version of API Connect.

Before you begin

  • Complete all steps in Upgrading subsystems on native Kubernetes prior to the step that links to this topic.
  • if you are upgrading from 10.0.5.2 or earlier: If you did not verify that your Portal customizations are compatible with Drupal 10, do that now.

    In API Connect 10.0.5.3, the Developer Portal moved from Drupal 9 to Drupal 10 (this upgrade also requires PHP 8.1). The upgrade tooling will update your Developer Portal sites; however, if you have any custom modules or themes, it is your responsibility to ensure their compatibility with Drupal 10 and PHP 8.1 before starting the upgrade. Review the Guidelines on upgrading your Developer Portal from Drupal 9 to Drupal 10 to ensure that any customizations to the Developer Portal are compatible with Drupal 10 and PHP 8.1.

About this task

When upgrading to a new mod release, the version must be changed to the latest mod release version on each CR. This change will be picked up by the operator, and the operator will then start the upgrade.

Procedure

  1. Update the portal CR for the new version of API Connect.
    1. Run the following command to edit the CR:
      kubectl -n $NAMESPACE edit ptl <CLUSTERNAME>

      where CLUSTERNAME is the name specified in the subsystem CR at installation time.

    2. Update the API Connect version in the CR:

      For example:

      version: 10.0.5.7
    3. If you are upgrading to a version of API Connect that requires a new license, update the license value now.

      For example:

      license: L-GVEN-GFUPVE

      For the list of licenses, see API Connect licenses.

    4. Run the following command to save and apply the CR: wq

      When you save the updated CR, the upgrade starts automatically.

      Known issue: Webhook error for incorrect license.

      If you did not update the license ID in the CR, then when you save your changes, the following webhook error might display:

      admission webhook "vmanagementcluster.kb.io" denied the request: 
      ManagementCluster.management.apiconnect.ibm.com "management" is invalid: 
      spec.license.license: Invalid value: "L-RJON-BYGHM4": 
      License L-RJON-BYGHM4 is invalid for the chosen version 10.0.5.7. 
      Please refer license document https://ibm.biz/apiclicenses

      To resolve the error, see API Connect licenses for the list of the available license IDs and select the appropriate License IDs for your deployment. Update the CR with the new license value as in the following example, and then save and apply your changes again.

  2. Run the following command to verify that the upgrade was successful:
    kubectl get apic -n <namespace>

    Example output after upgrading the portal subsystem:

    
    NAME                                                   READY   STATUS    VERSION    RECONCILED VERSION   MESSAGE          AGE
    portalcluster.portal.apiconnect.ibm.com/portal         3/3     Running   <version>  <version>            Site Upgrades Executing:(1) Queued(5) Failed(0) Success(0)   22h
    Note: After the portal subsystem code upgrade is complete, each portal site is upgraded. You can monitor the site upgrade progress from the MESSAGE column in the kubectl get apic output. You can still use the portal while sites are upgrading, although a maintenance page is shown for any sites that are being upgraded. When the site upgrades are complete the kubectl get apic output will show how many sites the portal is serving:
    NAME     READY   STATUS    VERSION          RECONCILED VERSION   MESSAGE              AGE
    portal   3/3     Running   <version>        <version>            Serving 2 sites      22h

    On two data center disaster recovery deployments, the sites are not upgraded until both data centers are upgraded.

  3. Optional: If upgrading to v10.0.5.3 (or later) from an earlier 10.0.5.x release: Review and configure the new inter-subsystem communication features: Optional post-upgrade steps for upgrade to 10.0.5.3 (or later) from earlier 10.0.5 release.