Links:
- https://www.mongodb.com/docs/manual/release-notes/5.0-upgrade-replica-set/
- https://www.mongodb.com/docs/manual/release-notes/6.0-upgrade-replica-set/
- https://www.mongodb.com/docs/manual/release-notes/7.0-upgrade-replica-set/
General Flow: You have to update the cluster to each intermediate version. You first upgrade all the secondaries to a version, then step down the primary. Once the primary is a secondary you can upgrade it. Once everything is on the new version, you update the featureCompatibilityVersion
setting so that you can proceed with the next version upgrade.