Skip to content

Rate this page
Thanks for your feedback
Thank you! The feedback has been submitted.

Get free database assistance or contact our experts for personalized support.

Upgrade Percona Server for MongoDB on OpenShift

Before you begin

  • Read Before you upgrade: compatibility and known issues before you proceed. It is important that you get familiar with the backup requirement, version-jump rules, and known problematic version combinations.
  • Check Considerations for Kubernetes cluster versions and upgrades if you plan to update the Kubernetes cluster.

Assumptions

For the procedures in this tutorial, we assume that you have set up the Smart Update strategy to update the objects in your database cluster.

Read more about the Smart Update strategy and other available ones in the Upgrade strategies section.

Upgrading Percona Server for MongoDB

  1. Check the version of the Operator you have in your Kubernetes environment. If you need to update it, refer to the Operator upgrade guide.
  2. Check the Custom Resource manifest configuration to be the following:

    • spec.updateStrategy option is set to SmartUpdate
    • spec.upgradeOptions.apply option is set to Disabled or Never.
    ...
    spec:
      updateStrategy: SmartUpdate
      upgradeOptions:
        apply: Disabled
        ...
    
  3. Find the new initial Operator installation image name (it had changed during the Operator upgrade) and other image names for the components of your cluster with the kubectl get deploy command:

    kubectl get deploy percona-server-mongodb-operator -o yaml
    
    Expected output
    ...
    "image": "registry.connect.redhat.com/percona/percona-server-mongodb-operator-containers@sha256:5d29132a60b89e660ab738d463bcc0707a17be73dc955aa8da9e50bed4d9ad3e",
    ...
    "initImage": "registry.connect.redhat.com/percona/percona-server-mongodb-operator@sha256:8adc57e9445cfcea1ae02798a8f9d6a4958ac89f0620b9c6fa6cf969545dd23f",
    ...
    "pmm": {
      "enabled": true,
      "image": "registry.connect.redhat.com/percona/percona-server-mongodb-operator-containers@sha256:165f97cdae2b6def546b0df7f50d88d83c150578bdb9c992953ed866615016f1",
    ...
    "backup": {
      "enabled": true,
      "image": "registry.connect.redhat.com/percona/percona-server-mongodb-operator-containers@sha256:a73889d61e996bc4fbc6b256a1284b60232565e128a64e4f94b2c424966772eb",
    ...
    
  4. We recommend to update the PMM Server before the upgrade of PMM Client. If you haven’t done it yet, exclude PMM Client from the list of images to update.

  5. Apply a patch to set the necessary crVersion value (equal to the Operator version) and update images in your cluster Custom Resource. Supposing that your cluster name is cluster1, the command should look as follows:

    kubectl patch psmdb my-cluster-name --type=merge --patch '{
        "spec": {
        "crVersion":"1.23.0",
        "image": "registry.connect.redhat.com/percona/percona-server-mongodb-operator-containers@sha256:5d29132a60b89e660ab738d463bcc0707a17be73dc955aa8da9e50bed4d9ad3e",
        "initImage": "registry.connect.redhat.com/percona/percona-server-mongodb-operator@sha256:8adc57e9445cfcea1ae02798a8f9d6a4958ac89f0620b9c6fa6cf969545dd23f",
        "pmm": {"image": "registry.connect.redhat.com/percona/percona-server-mongodb-operator-containers@sha256:165f97cdae2b6def546b0df7f50d88d83c150578bdb9c992953ed866615016f1"},
        "backup": {"image": "registry.connect.redhat.com/percona/percona-server-mongodb-operator-containers@sha256:a73889d61e996bc4fbc6b256a1284b60232565e128a64e4f94b2c424966772eb"}
        }}'
    
    kubectl patch psmdb my-cluster-name --type=merge --patch '{
        "spec": {
           "crVersion":"1.23.0",
           "image": "registry.connect.redhat.com/percona/percona-server-mongodb-operator-containers@sha256:5d29132a60b89e660ab738d463bcc0707a17be73dc955aa8da9e50bed4d9ad3e",
           "initImage": "registry.connect.redhat.com/percona/percona-server-mongodb-operator@sha256:8adc57e9445cfcea1ae02798a8f9d6a4958ac89f0620b9c6fa6cf969545dd23f",
           "backup": {"image": "registry.connect.redhat.com/percona/percona-server-mongodb-operator-containers@sha256:a73889d61e996bc4fbc6b256a1284b60232565e128a64e4f94b2c424966772eb"}
        }}'
    
  6. The deployment rollout will be automatically triggered by the applied patch.

See also


Last update: September 8, 2026
Created: November 4, 2024