- Deploy Resources >
- Deploy an Ops Manager Instance
Deploy an Ops Manager Instance¶
On this page
Alpha Release of Ops Manager Resource
Don’t use the Ops Manager resource in production environments.
You can deploy Ops Manager in a container with the Kubernetes Operator.
Prerequisites¶
To deploy an Ops Manager resource you must:
Install the MongoDB Enterprise Kubernetes Operator 1.3.0 or newer.
Ensure that the host on which you want to deploy Ops Manager has a minimum of five gigabytes of memory.
Create a Kubernetes secret for an admin user in the same namespace as the Ops Manager resource.
When you deploy the Ops Manager resource, Ops Manager creates a user with these credentials and grants it the
Global Owner
role. Use these credentials to log in to Ops Manager for the first time. Once Ops Manager is deployed, you should change the password or remove this secret.
Considerations¶
Encryption Key¶
The Kubernetes Operator generates an encryption key to protect
sensitive information in the Ops Manager Application Database. The
Kubernetes Operator saves this key in a secret in the same namespace as
the Ops Manager resource. The Kubernetes Operator names the secret
<om-resource-name>-gen-key
.
If you remove the Ops Manager resource, the key remains stored in the secret on Kubernetes cluster. If you stored the Application Database in a Persistent Volume and you create another Ops Manager resource with the same name, the Kubernetes Operator reuses the secret. If you create an Ops Manager resource with a different name, then Kubernetes Operator creates a new secret and Application Database, and the old secret isn’t reused.
Application Database Replica Set¶
When you create an instance of Ops Manager through the Kubernetes Operator, the Ops Manager Application Database is deployed as a replica set. You can’t configure the Application Database as a standalone database or sharded cluster. If you have concerns about performance or size requirements for the Application Database, contact MongoDB Support.
Procedure¶
Configure the settings highlighted in the prior example.¶
Key | Type | Description | Example |
---|---|---|---|
metadata.name |
string | Name for this Kubernetes Ops Manager object. See also
|
om |
spec.replicas |
number | Number of Ops Manager instances to run in parallel. The minimum valid value is Highly Available Ops Manager Resources For high availability, set this value to more than |
1 |
spec.version |
string | Version of Ops Manager to be installed. The format should be X.Y.Z. To view available Ops Manager versions, view the container registry. |
4.2.0 |
spec.adminCredentials |
string | Name of the secret you created for the Ops Manager admin user. Note Configure the secret to use the same namespace as the Ops Manager resource. |
om-admin-secret |
integer | Number of members of the Ops Manager Application Database replica set. | 3 |
|
string | Version of MongoDB that the Ops Manager Application Database should run. The format should be To learn more about MongoDB versioning, see see MongoDB Versioning in the MongoDB Manual. |
4.0.7 |
|
boolean | Optional. Flag indicating if this MongoDB Kubernetes resource should use Persistent Volumes for storage. Persistent volumes are not deleted when the MongoDB Kubernetes resource is stopped or restarted. If this value is To change your Persistent Volume Claims configuration, configure the following collections to meet your deployment requirements:
Warning Grant your containers permission to write to your Persistent Volume.
The Kubernetes Operator sets |
true |
(Optional) Configure any additional settings for an Ops Manager deployment.¶
You can add any of the following optional settings to the object specification file for an Ops Manager deployment:
spec.clusterName
spec.configuration
spec.applicationDatabase.
logLevel
spec.applicationDatabase.
featureCompatibilityVersion
spec.applicationDatabase.podSpec.
cpu
spec.applicationDatabase.podSpec.
cpuRequests
spec.applicationDatabase.podSpec.
memory
spec.applicationDatabase.podSpec.
memoryRequests
spec.applicationDatabase.podSpec.persistence.
single
spec.applicationDatabase.podSpec.persistence.multiple.
data
spec.applicationDatabase.podSpec.persistence.multiple.
journal
spec.applicationDatabase.podSpec.persistence.multiple.
logs
spec.applicationDatabase.podSpec.
podAffinity
spec.applicationDatabase.podSpec.
podAntiAffinityTopologyKey
spec.applicationDatabase.podSpec.
nodeAffinity
Save this file with a .yaml
file extension.¶
Create your Ops Manager instance.¶
Invoke the following kubectl
command on the filename of the
Ops Manager resource definition:
Track the status of your Ops Manager instance.¶
To check the status of your Ops Manager resource, invoke the following command:
The command returns the following output under the status
field
while the resource deploys:
After the resource completes the Reconciling
phase, the command
returns the following output under the status
field:
The status.opsManager.url
is the connection URL of the resource,
which can be used to reach Ops Manager from inside the Kubernetes
cluster.
If the deployment fails, see Troubleshooting the Kubernetes Operator.
Access your Ops Manager instance from a browser.¶
After the resource deploys successfully, find the external port to your Ops Manager instance.
Invoke the following
kubectl
command on<metadata.name>-svc-external
:metadata.name
:The command returns the external port in the
PORT(S)
column. In the following example output, the external port is30036
:Set your firewall rules to allow access from the Internet to the external port on the host.
Open a browser window and navigate to the Ops Manager application using the FQDN and port number.
Log in to Ops Manager using the admin user credentials.