- Deploy and Configure MongoDB Database Resources >
- Deploy a MongoDB Database Resource >
- Deploy a Standalone MongoDB Instance
Deploy a Standalone MongoDB Instance¶
On this page
Note
At any place on this page that says Ops Manager, you can substitute Cloud Manager.
Important
- You can use the Kubernetes Operator to deploy MongoDB resources with Ops Manager version 4.0.11 or later and Cloud Manager.
- You can’t use the Kubernetes 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.
Prerequisites¶
To deploy a standalone using an object, you need to complete the following procedures:
Considerations¶
Starting in MongoDB Enterprise Kubernetes Operator version 1.3.0, you can only have one MongoDB resource per project. To learn how to migrate your project to a single-cluster configuration, see Migrate to One Resource per Project (Required for Version 1.3.0).
Procedure¶
Configure the settings highlighted in the preceeding step as follows.¶
Key | Type | Description | Example |
---|---|---|---|
metadata.name |
string | Label for this Kubernetes standalone object. Resource names must be 44 characters or less. See also
|
my-project |
spec.version |
string | Version of MongoDB that is installed on this standalone. The format should be To learn more about MongoDB versioning, see MongoDB Versioning in the MongoDB Manual. |
4.2.2-ent |
string | Name of the ConfigMap with the Ops Manager connection
configuration. The
Value must match namespace and name of ConfigMap This value must match the namespace in which you created the Ops Manager project ConfigMap. |
<myproject> |
|
spec.credentials |
string | Name of the Kubernetes secret you created as Ops Manager API authentication credentials for the Kubernetes Operator to communicate with Ops Manager. Value must use namespace and name of Secret This value must match the namespace in which you created the
secret and the Operator manages changes to the Secret The Kubernetes Operator tracks any changes to the Secret and reconciles the state of the MongoDB Kubernetes resource. |
<mycredentials> |
spec.type |
string | Type of MongoDB Kubernetes resource to create. | Standalone |
spec.persistent |
string | Optional. If this value is To change your Persistent Volume Claims configuration, configure the following collections to meet your deployment requirements:
Warning Your containers must have permissions to write to your Persistent Volume.
The Kubernetes Operator sets Note If you do not use Persistent Volumes, the Disk Usage and Disk IOPS charts cannot be displayed in either the Processes tab on the Deployment page or in the Metrics page when reviewing the data for this deployment. |
true |
Add any additional accepted settings for a Standalone deployment.¶
You can also add any of the following optional settings to the object specification file for a Standalone deployment:
spec.additionalMongodConfig
spec.exposedExternally
spec.logLevel
spec.featureCompatibilityVersion
spec.podSpec.cpu
spec.podSpec.cpuRequests
spec.podSpec.memory
spec.podSpec.memoryRequests
spec.podSpec.persistence.single
spec.podSpec.persistence.multiple.data
spec.podSpec.persistence.multiple.journal
spec.podSpec.persistence.multiple.logs
spec.podSpec.podAffinity
spec.podSpec.nodeAffinity
Save this file with a .yaml
file extension.¶
Start your Standalone deployment.¶
Invoke the following Kubernetes command to create your standalone:
Track the status of your standalone deployment.¶
To check the status of your MongoDB Kubernetes resource, invoke the following command:
The -w
flag means “watch”. With the “watch” flag set, the output
refreshes immediately when something changes until the status phase
achieves the Running
state.
See Troubleshooting the Kubernetes Operator for information about the resource deployment statuses.
To troubleshoot your sharded cluster, see: