- Install and Configure the Kubernetes Operator >
- Upgrade the Kubernetes Operator from Prior Versions >
- Upgrade the MongoDB Enterprise Kubernetes Operator
Upgrade the MongoDB Enterprise Kubernetes Operator¶
The following procedure outlines how to upgrade the Kubernetes Operator to its latest version.
Upgrading to version 1.14.0 or 1.15.0
Kubernetes Operator version 1.15.1 fixes an issue that prevented the Kubernetes Operator upgrade when managing a TLS-enabled Application Database whose TLS certificate is stored in an Opaque secret.
We recommend that you upgrade to Kubernetes Operator version 1.15.1 or later.
We strongly advise against upgrading to Kubernetes Operator version 1.14.0 or 1.15.0.
If you have a broken Application Database after upgrading to Kubernetes Operator version 1.14.0 or 1.15.0, see Ops Manager in Failed State.
Upgrading to version 1.11.0 and later
If OpenShift is your Kubernetes solution, upgrade the Kubernetes Operator to the latest available version.
The Kubernetes Operator version 1.14 has compatibility issues on OpenShift deployments.
The following steps depend on how your environment is configured:
- Kubernetes
- OpenShift
- Online using kubectl
- Online using Helm
- Offline using Helm and Docker
Upgrade the CustomResourceDefinitions for MongoDB deployments.¶
Invoke the following kubectl
command:
Optional: Customize the Kubernetes Operator YAML before upgrading it.¶
To learn about optional Kubernetes Operator installation settings, see Operator kubectl and oc Installation Settings.
If you are upgrading the Operator to version 1.13.0 or later, specify the spec.opsManager.configMapRef.name
or the spec.cloudManager.configMapRef.name
settings:¶
- Open the MongoDB Database Resource Specification in the editor of your choice.
- Search for the deprecated
spec.project
setting and remove it. - Add the value to the
spec.opsManager.configMapRef.name
setting or thespec.cloudManager.configMapRef.name
setting and save the specification.
To learn more, see Changes to the MongoDB Resource.
If you are upgrading the Operator to version 1.13.0 or later, specify the spec.opsManager.configMapRef.name
or the spec.cloudManager.configMapRef.name
settings:¶
- Open the MongoDB Database Resource Specification in the editor of your choice.
- Search for the deprecated
spec.project
setting and remove it. - Add the value to the
spec.opsManager.configMapRef.name
setting or thespec.cloudManager.configMapRef.name
setting and save the specification.
To learn more, see Changes to the MongoDB Resource.
Optional: Customize your Helm Chart before upgrading it.¶
To learn about optional Kubernetes Operator installation settings, see Operator Helm Installation Settings.
Upgrade the Kubernetes Operator.¶
Invoke the following helm
command:
To upgrade the Kubernetes Operator on a host not connected to the Internet:
If you are upgrading the Operator to version 1.13.0 or later, specify the spec.opsManager.configMapRef.name
or the spec.cloudManager.configMapRef.name
settings:¶
- Open the MongoDB Database Resource Specification in the editor of your choice.
- Search for the deprecated
spec.project
setting and remove it. - Add the value to the
spec.opsManager.configMapRef.name
setting or thespec.cloudManager.configMapRef.name
setting and save the specification.
To learn more, see Changes to the MongoDB Resource.
Optional: Customize your Helm Chart before upgrading it.¶
To learn about optional Kubernetes Operator installation settings, see Operator Helm Installation Settings.
Upgrade to the latest version of the Kubernetes Operator.¶
Invoke the following helm upgrade
command.
Use the registry.pullPolicy=IfNotPresent
setting. To learn
about optional Kubernetes Operator installation settings, see
Operator Helm Installation Settings.
- Online using oc
- Online using Helm
- Offline using Helm and Docker
Upgrade the CustomResourceDefinitions for MongoDB deployments.¶
Invoke the following oc
command:
Optional: Customize the Kubernetes Operator YAML before upgrading it.¶
To learn about optional Kubernetes Operator installation settings, see Operator kubectl and oc Installation Settings.
If you are upgrading the Operator to version 1.13.0 or later, specify the spec.opsManager.configMapRef.name
or the spec.cloudManager.configMapRef.name
settings:¶
- Open the MongoDB Database Resource Specification in the editor of your choice.
- Search for the deprecated
spec.project
setting and remove it. - Add the value to the
spec.opsManager.configMapRef.name
setting or thespec.cloudManager.configMapRef.name
setting and save the specification.
To learn more, see Changes to the MongoDB Resource.
If you are upgrading the Operator to version 1.13.0 or later, specify the spec.opsManager.configMapRef.name
or the spec.cloudManager.configMapRef.name
settings:¶
- Open the MongoDB Database Resource Specification in the editor of your choice.
- Search for the deprecated
spec.project
setting and remove it. - Add the value to the
spec.opsManager.configMapRef.name
setting or thespec.cloudManager.configMapRef.name
setting and save the specification.
To learn more, see Changes to the MongoDB Resource.
Optional: Customize your Helm Chart before upgrading it.¶
To learn about optional Kubernetes Operator installation settings, see Operator Helm Installation Settings.
Upgrade the Kubernetes Operator.¶
Invoke the following helm upgrade
command.
Use values-openshift.yaml settings. To learn
about optional Kubernetes Operator installation settings, see
Operator Helm Installation Settings.
To upgrade the Kubernetes Operator on a host not connected to the Internet:
If you are upgrading the Operator to version 1.13.0 or later, specify the spec.opsManager.configMapRef.name
or the spec.cloudManager.configMapRef.name
settings:¶
- Open the MongoDB Database Resource Specification in the editor of your choice.
- Search for the deprecated
spec.project
setting and remove it. - Add the value to the
spec.opsManager.configMapRef.name
setting or thespec.cloudManager.configMapRef.name
setting and save the specification.
To learn more, see Changes to the MongoDB Resource.
Optional: Customize your Helm Chart before upgrading it.¶
To learn about optional Kubernetes Operator installation settings, see Operator Helm Installation Settings.
Upgrade to the latest version of the Kubernetes Operator.¶
Invoke the following helm upgrade
command:
Use the values-openshift.yaml
settings, registry.pullPolicy=IfNotPresent
, and
registry.imagePullSecrets=<openshift-pull-secret>
. To learn
about optional Kubernetes Operator installation settings, see
Operator Helm Installation Settings.
To troubleshoot your Kubernetes Operator, see Review Logs from the Kubernetes Operator and other troubleshooting topics.
Important
If you need to remove the Kubernetes Operator or the namespace, you first must remove MongoDB resources.