Docs Menu
Docs Home
/
MongoDB Enterprise Kubernetes Operator
/

Install the MongoDB Enterprise Kubernetes Operator

On this page

  • Prerequisites and Considerations
  • Install with Kubernetes
  • Install with OpenShift
  • Verify the Installation
  • Install a Specific Daily Build with Helm
  • Next Steps

Before you install the Kubernetes Operator, make sure you plan for your installation:

Note

This tutorial presumes some knowledge of Kubernetes and links to relevant Kubernetes documentation. If you are unfamiliar with Kubernetes, please review that documentation first.

Choose one of the following installation procedures to install the Kubernetes Operator:

  • Install with Kubernetes

  • Install with OpenShift

The installation procedure varies based on how you want to configure your environment:

Before you begin, ensure that the MANAGED_SECURITY_CONTEXT flag is set to true when you deploy the Kubernetes Operator to OpenShift. This value is pre-defined in the values-openshift.yaml file.

The installation procedure varies based on how you want to configure your environment:

To verify that the Kubernetes Operator installed correctly, run the following command and verify the output:

By default, deployments exist in the mongodb namespace. If the following error message appears, ensure you use the correct namespace:

Error from server (NotFound): deployments.apps "mongodb-enterprise-operator" not found

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.

MongoDB rebuilds Kubernetes Operator images every day to integrate the latest security and OS updates.

By default, helm installs the latest build for the version of the Kubernetes Operator you specify.

To install an earlier build, specify the build ID as a parameter with --set build=<build-id>. Build IDs are always in the format -b<YYYYMMDD>T000000Z, where <YYYYMMDD> is the date that the build you want to use was created.

Example

This example shows how to install the Kubernetes Operator with the latest image:

helm install enterprise-operator mongodb/enterprise-operator

This example shows how to install the Kubernetes Operator with the image created at midnight on February 5th, 2021:

helm install enterprise-operator mongodb/enterprise-operator \
--set build=-b20210205T000000Z

Note

MongoDB recommends using the default (latest) build.

After installing the MongoDB Enterprise Kubernetes Operator, you can:

← Prerequisites