Preparing for the upgrade to Postgres 13 on Kubernetes

Back up the Management and Portal CRs and ensure that the PVC size is sufficient to complete the upgrade to the newer Postgres version.

Before you begin

Complete this task before you attempt an upgrade to API Connect 10.0.5.8 or later from version 10.0.5.7 or earlier.

About this task

Earlier releases of API Connect 10.0.5.x use Postgres 12, which moves to End of Life status in November 2024. API Connect 10.0.5.8 uses Postgres 13, which is a major upgrade; before upgrading API Connect, you must ensure that your PVC contains sufficient free space for the Postgres upgrade.

Procedure

  1. Back up the CRs for the Management and Portal components.

    If you need to roll back to your previous version, this step ensures that you have the latest backups.

  2. Run a manual pgdump.

    Run the following commands:

    1. kubectl get po -l role=master
    2. kubectl exec -it <postgres-master-pod> – bash
    3. pg_dump -c lur > /pgdata/lur.sql
    4. pg_dump -c apim > /pgdata/apim.sql
  3. Check the size of the apim.sql and lur.sql dump files, and add them up.
    • Local storage:

      If your Kubernetes cluster uses local-storage, ensure that is has at least as much free space as the combined size of the apim.sql and lur.sql dump files; this space will be needed for the Postgres upgrade.

    • Other storage types:

      If you use a PVC, verify that it has at least as much free space as the combined size of the apim.sql and lur.sql dump files; this space will be needed for the Postgres upgrade. During the upgrade, the PVC used for the upgrade defaults to 5 GB. If 5 GB is not sufficient, continue to the next step to increase the PVC size.

  4. If the PVC size is insufficient, add an annotation to the Management CR to ensure that there is enough space for the upgrade.

    Edit the Management CR and add the following annotation, providing a size value that is at least as large as the combined size of the apim.sql and lur.sql dump files. For example:

    apiconnect-operator/pgdump-storage-size="10Gi"

What to do next

After ensuring that the PVC has sufficient space for the Postgres upgrade, proceed to Upgrading subsystems on native Kubernetes.