At any place on this page that says Ops Manager, you can substitute Cloud Manager.
You can use the Kubernetes Operator to deploy MongoDB resources with Cloud Manager and with Ops Manager version 5.0.x or later.
You can use the Atlas Operator to deploy MongoDB resources to Atlas.
You can deploy a standalone MongoDB instance for Ops Manager to manage. Use standalone instances for testing and development. Do not use these deployments for production systems as they lack replication and high availability. For all production deployments use replica sets. To learn about replica sets, see Deploy a Replica Set.
To deploy a standalone using an object, you must:
If you have not already, run the following command to execute all
kubectl commands in the namespace you created.
If you are deploying an Ops Manager resource in a multi-Kubernetes-cluster deployment:
contextto the name of the central cluster, such as:
kubectl config set context "$MDB_CENTRAL_CLUSTER_FULL_NAME".
--namespaceto the same scope that you used for your multi-Kubernetes-cluster deployment, such as:
kubectl config --namespace "mongodb".
kubectl config set-context $(kubectl config current-context) --namespace=<metadata.namespace>
Copy the following example standalone Kubernetes object.
This is a YAML file that you can modify to meet your desired configuration. Change the highlighted settings to match your desired standalone configuration.
apiVersion: mongodb.com/v1 kind: MongoDB metadata: name: <my-standalone> spec: version: "4.2.2-ent" opsManager: configMapRef: name: <configMap.metadata.name> # Must match metadata.name in ConfigMap file credentials: <mycredentials> type: Standalone persistent: true ...
Open your preferred text editor and paste the object specification into a new text file.
Version of MongoDB that is installed on this standalone.
The format should be
Ensure that you choose a compatible MongoDB Server version.
Compatible versions differ depending on the base image that the MongoDB database resource uses.
To learn more about MongoDB versioning, see MongoDB Versioning in the MongoDB Manual.
Operator manages changes to the Secret
The Kubernetes Operator tracks any changes to the Secret and
reconciles the state of the
MongoDB resource to create.
If this value is
To change your Persistent Volume Claims configuration, configure the following collections to meet your deployment requirements:
Grant your containers permission to write to your Persistent Volume.
The Kubernetes Operator sets
You can also add any of the following optional settings to the object specification file for a Standalone deployment:
To check the status of your
MongoDB resource, use the following
kubectl get mdb <resource-name> -o yaml -w
-w (watch) flag set, when the configuration changes, the output
refreshes immediately until the status phase achieves the
To learn more about resource deployment statuses, see Troubleshoot the Kubernetes Operator.
To troubleshoot your sharded cluster, see: