For AI agents: a documentation index is available at https://www.mongodb.com/docs/llms.txt — markdown versions of all pages are available by appending .md to any URL path.
Docs Menu

Install MongoDB Search and Vector Search on multiple Clusters

You can use the Kubernetes Operator to deploy MongoDB Search and Vector Search across multiple Kubernetes clusters for an external MongoDB deployment. In this case the Kubernetes Operator just manages mongot, not the external MongoDB deployment. Your MongoDB deployment is external to the Kubernetes Operator. It can run:

  • Outside Kubernetes, such as on virtual machines

  • In Kubernetes clusters, but not managed by the Kubernetes Operator

The Kubernetes Operator runs in a single, central cluster and deploys a mongot group into each Kubernetes cluster that you list in the spec.clusters field of the MongoDBSearch custom resource. Each mongot group syncs only from the MongoDB members that you map to it. You control this mapping with member tags, which you set later in this procedure.

Select your configuration to filter the installation procedure for your deployment.

Note

Multi-cluster deployments require MongoDB Enterprise Edition and an external MongoDB deployment. Multi-cluster deployments in which the Kubernetes Operator manages the MongoDB deployment aren't currently supported as source to the multi-cluster Search deployment. See the Supported Topologies.

Before you install MongoDB Search and Vector Search using the Kubernetes Operator, complete the following tasks.

Before you install MongoDB Search and Vector Search using the Kubernetes Operator, complete the steps in the following sections:

You must create a user with the searchCoordinator role. In MongoDB versions 8.2 and later, searchCoordinator is a built-in role.

To create the user and assign them the built-in searchCoordinator role, complete the following steps using either the Cloud Manager or Ops Manager UI or the mongosh:

1
  1. Log in to Cloud Manager or Ops Manager UI.

  2. Go to the Security tab and click Users.

2
3
Username

Enter search-sync-source.

Password

Set a strong, secure password.

Authentication Database

Choose the admin database.

4

In the Assign Roles section, select the built-in searchCoordinator role from the dropdown for the admin database.

5

In mongosh, run the following commands:

1
use admin;
2
db.createUser({
user: "search-sync-source",
pwd: "<PASSWORD>", // Replace with your actual password
roles: [
{ role: "searchCoordinator", db: "admin" }
]
});

In the Cloud Manager or Ops Manager UI, configure the following settings. To learn more about these parameters, see MongoDB Search and Vector Search Settings.

After mongot pods are running across all member clusters, you can: