- Deploy and Configure Ops Manager Resources >
- Deploy an Ops Manager Resource
Deploy an Ops Manager Resource¶
On this page
You can deploy Ops Manager in a container with the Kubernetes Operator.
Prerequisites and Considerations¶
Before you deploy an Ops Manager resource, make sure you plan for your Ops Manager resource:
- Complete the Prerequisites
- Read the Considerations.
Procedure¶
Configure the settings highlighted in the prior example.¶
Key | Type | Description | Example |
---|---|---|---|
metadata.name |
string | Name for this Kubernetes Ops Manager object. Resource names must be 44 characters or less. 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.6 |
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 |
boolean | Flag that indicates that Backup is enabled for your You must
specify spec.backup.enabled: true to configure settings
for the head database, oplog store, and snapshot store. |
true |
|
string | Name of the oplog store. | oplog1 |
|
string | Name of the MongoDB database resource for the oplog store. | my-oplog-db |
|
string | Name of the S3 snapshot store. | s3store1 |
|
string | Name of the MongoDB database resource for the S3 snapshot store metadata. | my-s3-metadata-db |
|
string | Name of the secret that contains the accessKey and
secretKey fields. The Backup Daemon Service uses the
values of these fields as credentials to access the S3 or
S3-compatible bucket. |
my-s3-credentials |
|
string | URL of the S3 or S3-compatible bucket that stores the database Backup snapshots. | s3.us-east-1.amazonaws.com |
|
string | Name of the S3 or S3-compatible bucket that stores the database Backup snapshots. | my-bucket | |
string | Optional. The Kubernetes service ServiceType that exposes Ops Manager outside of Kubernetes. Note Exclude the
|
LoadBalancer |
|
integer | Number of members of the Ops Manager Application Database replica set. | 3 |
|
string | Optional. Version of MongoDB that the Ops Manager Application Database should run. The format should be Deploy Ops Manager Resource Offline To deploy Ops Manager inside Kubernetes without an Internet connection, omit this setting or leave the value empty. The Kubernetes Operator installs the bundled MongoDB Enterprise version 4.2.2 by default. To learn more about MongoDB versioning, see see MongoDB Versioning in the MongoDB Manual. |
4.2.2-ent |
|
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.¶
Add any optional settings that you want to apply to your deployment to the object specification file.
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 Ops Manager Application remains in a Pending
state until you configure
the Backup databases.
Tip
The status.opsManager.url
field states the resource’s
connection URL. Using this URL, you can reach Ops Manager from
inside the Kubernetes cluster or create a project using a
ConfigMap.
Access the Ops Manager application.¶
The steps you take differ based on how you are routing traffic to the Ops Manager application in Kubernetes. If you configured the Kubernetes Operator to create a Kubernetes service for you, or you created a Kubernetes service manually, use one of the following methods to access the Ops Manager application:
- External Traffic Routes Using LoadBalancer Service
- External Traffic Routed Using NodePort Service
Query your cloud provider to get the FQDN of the load balancer service. See your cloud provider’s documentation for details.
Open a browser window and navigate to the Ops Manager application using the FQDN and port number of your load balancer service.
Log in to Ops Manager using the admin user credentials.
Set your firewall rules to allow access from the Internet to the
spec.externalConnectivity.
port
on the host on which your Kubernetes cluster is running.Open a browser window and navigate to the Ops Manager application using the FQDN and the
spec.externalConnectivity.
port
.Log in to Ops Manager using the admin user credentials.
To learn how to access the Ops Manager application using a third-party service, refer to the documentation for your solution.
Create credentials for the Kubernetes Operator.¶
To configure credentials, you must create an Ops Manager organization, generate programmatic API keys, and create a secret. These activities follow the prerequisites and procedure on the Create Credentials for the Kubernetes Operator page.
Create a project using a ConfigMap.¶
To create a project, follow the prerequisites and procedure on the Create One Project using a ConfigMap page.
You must set data.baseUrl
in the ConfigMap to the Ops Manager Application’s URL. To find this URL, invoke the following command:
The command returns the URL of the Ops Manager Application in the
status.opsManager.url
field.
Important
If you deploy Ops Manager with the Kubernetes Operator and Ops Manager will
manage MongoDB database resources deployed outside of the Kubernetes
cluster it’s deployed to, you must set data.baseUrl
to the same
value of the
spec.configuration.mms.centralUrl
setting in the Ops Manager resource specification.
Deploy MongoDB database resources to complete the Backup configuration.¶
By default, Ops Manager enables Backup. Create a MongoDB database resource for the oplog and snapshot stores to complete the configuration.
Deploy a MongoDB database resource for the oplog store in the same namespace as the Ops Manager resource.
Note
Create this database as a three-member replica set.
Match the
metadata.name
of the resource with thespec.backup.opLogStores.mongodbResourceRef.name
that you specified in your Ops Manager resource definition.Deploy a MongoDB database resource for the S3 snapshot store in the same namespace as the Ops Manager resource.
Note
Create the S3 snapshot store as a replica set.
Match the
metadata.name
of the resource to thespec.backup.s3Stores.mongodbResourceRef.name
that you specified in your Ops Manager resource definition.
Confirm that the Ops Manager resource is running.¶
To check the status of your Ops Manager resource, invoke the following command:
When the Ops Manager is running, the command returns the following
output under the status
field:
See Troubleshooting the Kubernetes Operator for information about the resource deployment statuses.