Skip to main content

Your submission was sent successfully! Close

Thank you for signing up for our newsletter!
In these regular emails you will find the latest updates from Canonical and upcoming events where you can meet our team.Close

Thank you for contacting us. A member of our team will be in touch shortly. Close

How to perform a minor upgrade on a sharded cluster

This feature is only available on specific revisions in Charmed MongoDB K8s 6/stable, listed in Minor version upgrade > Supported revisions.

If you wish to upgrade to/from a different, non-supported revision, then perform a cluster migration via backup.


Here is a summary of the steps to perform a minor upgrade on a sharded cluster:

  1. Determine your current revision
  2. Determine new revision
  3. Upgrade config-server
  4. Upgrade shards
  5. Upgrade mongos applications

Step 1: Determine your current revision

Find determine your current revision:

juju status | grep <app-name> | head -1 | awk '{print $5}'

If your current revision is not in the list of supported revisions for upgrades, then you must perform a cluster migration via backup.

If the upgrade is unsuccessful, you will need this revision number to roll back your application.

Step 2: Determine new revision

Choose a revision to upgrade to from the list of available revisions to upgrade to. By the end of your upgrade, the config-servers and shards must all be on the same revision.

Step 3: Upgrade config-server

To upgrade your config-server, follow the instructions in how to upgrade a replica set

Do not proceed if this step was not successful. If your upgrade failed, roll back the cluster.

Step 4: Begin upgrade

If you succeeded in upgrade your config-server in Step 3, you may proceed to upgrade your shards.

Upgrade each shard one at a time. Start by upgrading the first shard and follow the instructions in how to upgrade a replica set.

Upgrade the next shard only when the current upgrade succeeds - i.e. all units show active and idle statuses.

Do not proceed if an upgrade of a shard fails. If an upgrade fails, rollback the entire cluster.

Step 5: Upgrade mongos applications

Next, upgrade any integrated mongos applications by following the Charmed Mongos K8s documentation on How to perform a minor version upgrade.

Last updated 26 days ago. Help improve this document in the forum.