Skip to content

For help, click the link below to get free database assistance or contact our experts for personalized support.

To a specific version

Upgrading Percona XtraDB Cluster to a specific version

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.

Before you start

  1. We recommend to update PMM Server before upgrading PMM Client.

  2. If you are using custom configuration for HAProxy, check the HAProxy configuration file provided by the Operator before the upgrade. Find the haproxy-global.cfg for the Operator version {{ release }} here ).

    Make sure that your custom config is still compatible with the new variant, and make necessary additions, if needed.

Procedure

To update Percona XtraDB Cluster to a specific version, do the following:

  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. Check the current version of the Custom Resource and what versions of the database and cluster components are compatible with it. Use the following command:

    $ curl https://check.percona.com/versions/v1/pxc-operator/1.17.0 |jq -r ‘.versions[].matrix’
    

    You can also find this information in the Versions compatibility matrix.

  4. Update the Custom Resource, the database, backup, proxy and PMM Client image names with a newer version tag. Find the image names in the list of certified images.

    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.

    Since this is a working cluster, the way to update the Custom Resource is to apply a patch with the kubectl patch pxc command.

    $ kubectl patch pxc cluster1 --type=merge --patch '{
       "spec": {
           "crVersion":"1.17.0",
           "pxc":{ "image": "percona/percona-xtradb-cluster:8.0.41-32.1" },
           "proxysql": { "image": "percona/proxysql2:2.7.1-1" },
           "haproxy":  { "image": "percona/haproxy:2.8.14" },
           "backup":   { "image": "percona/percona-xtradb-cluster-operator:1.17.0-pxc8.0-backup-pxb8.0.35" },
           "logcollector": { "image": "percona/percona-xtradb-cluster-operator:1.17.0-logcollector-fluentbit4.0.0" },
           "pmm":      { "image": "percona/pmm-client:2.44.0" }
       }}'
    
    $ kubectl patch pxc cluster1 --type=merge --patch '{
       "spec": {
           "crVersion":"1.17.0",
           "pxc":{ "image": "percona/percona-xtradb-cluster:5.7.44-31.65" },
           "proxysql": { "image": "percona/proxysql2:2.7.1-1" },
           "haproxy":  { "image": "percona/haproxy:2.8.14" },
           "backup":   { "image": "percona/percona-xtradb-cluster-operator:1.17.0-pxc5.7-backup-pxb2.4.29" },
           "logcollector": { "image": "percona/percona-xtradb-cluster-operator:1.17.0-logcollector-fluentbit4.0.0" },
           "pmm":      { "image": "percona/pmm-client:2.44.0" }
       }}'
    
    $ kubectl patch pxc cluster1 --type=merge --patch '{
       "spec": {
           "crVersion":"1.17.0",
           "pxc":{ "image": "percona/percona-xtradb-cluster:8.0.41-32.1" },
           "proxysql": { "image": "percona/proxysql2:2.7.1-1" },
           "haproxy":  { "image": "percona/haproxy:2.8.14" },
           "backup":   { "image": "percona/percona-xtradb-cluster-operator:1.17.0-pxc8.0-backup-pxb8.0.35" },
           "logcollector": { "image": "percona/percona-xtradb-cluster-operator:1.17.0-logcollector-fluentbit4.0.0" }
       }}'
    
    $ kubectl patch pxc cluster1 --type=merge --patch '{
       "spec": {
           "crVersion":"1.17.0",
           "pxc":{ "image": "percona/percona-xtradb-cluster:5.7.44-31.65" },
           "proxysql": { "image": "percona/proxysql2:2.7.1-1" },
           "haproxy":  { "image": "percona/haproxy:2.8.14" },
           "backup":   { "image": "percona/percona-xtradb-cluster-operator:1.17.0-pxc5.7-backup-pxb2.4.29" },
           "logcollector": { "image": "percona/percona-xtradb-cluster-operator:1.17.0-logcollector-fluentbit4.0.0" }
       }}'
    
  5. The deployment rollout will be automatically triggered by the applied patch. You can track the rollout process in real time with the kubectl rollout status command with the name of your cluster:

    $ kubectl rollout status sts cluster1-pxc
    

Last update: 2025-08-07