- Deploy and Configure MongoDB Database Resources >
- Edit a Database Resource >
- Upgrade MongoDB Version and FCV
Upgrade MongoDB Version and FCV¶
You can upgrade the major, minor, and/or feature compatibility versions of your MongoDB resource. These settings are configured in your resource’s ConfigMap.
- To upgrade your resource’s major and/or minor versions, set the
spec.version
setting to the desired MongoDB version. - To modify your resource’s
feature compatibility version,
set the
spec.featureCompatibilityVersion
setting to the desired version.
Note
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 Manual.
Example¶
Consider the following ConfigMap for a standalone resource:
This resource has a MongoDB version of 4.0.14-ent
. The
following steps upgrade the deployment’s MongoDB version to
4.2.2-ent
:
Perform the following modifications to the resource’s ConfigMap:
- Set
spec.version
to the desired MongoDB version. - Set
spec.featureCompatibilityVersion
to the current working MongoDB version:
Note
Setting
featureCompatibilityVersion
to"4.0"
disables 4.2 features incompatible with MongoDB 4.0.- Set
Reapply the configuration to Kubernetes:
Kubernetes automatically reconfigures your deployment with the new specifications. You can see these changes reflected in the Ops Manager or Cloud Manager application.