On this page
You can upgrade the major, minor, or feature compatibility versions of your MongoDB resource. Configure these settings in your MongoDB Database Resource Specification.
To upgrade your resource's major or minor versions, set the
spec.version setting to the desired MongoDB version.
If you update
spec.version to a later version, consider setting
spec.featureCompatibilityVersion to the current working
MongoDB version to give yourself the option to downgrade if
necessary. To learn more about feature compatibility, see
setFeatureCompatibilityVersion in the MongoDB Server
To upgrade the standalone deployment's MongoDB version from
4.4.18-ent, complete the steps in the following syntactic example.
If you update
spec.version to a later version without setting the
spec.featureCompatibilityVersion to any value, the Feature
Compatibility Version (FCV) upgrades to the same version that you specify
spec.version. However, you can explicitly specify a previous
version for the FCV. The following example illustrates this use case.
Change the settings in the MongoDB Database Resource Specification as shown in the following example:
spec.versionto the desired MongoDB version.
spec.featureCompatibilityVersionto the current working MongoDB version:
apiVersion: mongodb.com/v1 kind: MongoDB metadata: name: my-standalone-downgrade spec: version: "4.4.18-ent" featureCompatibilityVersion: "4.2" type: Standalone project: my-project credentials: my-credentials persistent: false ...
The following example shows the result of this change:
spec: version: "4.4.18-ent" featureCompatibilityVersion: "4.2"