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.
Make the MongoDB docs better! We value your opinion. Share your feedback for a chance to win $100.
MongoDB Branding Shape
Click here >
Docs Menu

Install Search With External MongoDB Enterprise

You can use the Kubernetes Operator to deploy MongoDB Search and Vector Search on a Kubernetes cluster to run with an external MongoDB Enterprise Edition 8.2 or later server. This tutorial shows you how to deploy and configure one or more mongot processes in your Kubernetes cluster to use a new or existing external replica set or sharded cluster.

Before you install MongoDB Search and Vector Search using the Kubernetes Operator, you must do the following:

Log in to the Cloud Manager or Ops Manager UI and perform the following steps to configure Cloud Manager or Ops Manager for MongoDB Search and Vector Search.

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

  2. Click the Deployment tab.

  3. Select the cluster that you want to modify.

2
  1. Click the Modify button to open the deployment configuration editor.

  2. Click Advanced Configuration Options under the Process Configuration section.

  3. Click the Add Option button and select setParameter Startup Option from the dropdown.

  4. Add the following parameters in the fields, one by one, by clicking Add after adding the name and value:

3
  1. Click the Review & Deploy button.

  2. Review and confirm to apply the changes.

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 :

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 , 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" }
]
});

Prepare your environment to run the sample code in this tutorial in a terminal.

Configure your Kubernetes cluster for MongoDB Search and Vector Search.

Configure TLS certificates for your Kubernetes cluster.

After deploying MongoDB Search and Vector Search to use with external MongoDB Enterprise Edition, you can add data into your MongoDB cluster, create MongoDB Search and Vector Search indexes, and run queries against your data. To learn more, see MongoDB Search and Vector Search Settings.