Join us at MongoDB.local London on 7 May to unlock new possibilities for your data. Use WEB50 to save 50%.
Register now >
Docs Menu
Docs Home
/ /
/ / /

MongoDB Search and Vector Search Settings

You can deploy MongoDB Search and Vector Search alongside MongoDB 8.2 or later using MongoDB Controllers for Kubernetes Operator.

The following example shows the settings inside the spec object for MongoDB Search and Vector Search deployment. To learn more about these settings, see the Required Settings and Optional Settings.

Note

This example is not a working configuration. It contains all available fields populated with sample values for reference. Some fields are mutually exclusive (for example, source.mongodbResourceRef and source.external). Refer to the field descriptions below for valid combinations.

Example

1spec:
2 source:
3 mongodbResourceRef:
4 name: mdb
5 external:
6 hostAndPorts:
7 - mdb-rs-external-0.example.com:27017
8 - mdb-rs-external-1.example.com:27017
9 - mdb-rs-external-2.example.com:27017
10 shardedCluster:
11 router:
12 hosts:
13 - mongos1.example.com:27017
14 - mongos2.example.com:27017
15 shards:
16 - shardName: shard-0
17 hosts:
18 - shard0-node1.example.com:27018
19 - shard0-node2.example.com:27018
20 - shardName: shard-1
21 hosts:
22 - shard1-node1.example.com:27018
23 - shard1-node2.example.com:27018
24 tls:
25 ca:
26 name: mdbc-rs-ca
27 username: search-sync-source
28 passwordSecretRef:
29 name: mdbc-rs-search-sync-source-password
30 key: password
31 # x509 authentication (mutually exclusive with
32 # username/passwordSecretRef)
33 x509:
34 clientCertificateSecretRef:
35 name: mongot-x509-client-cert
36 replicas: 2
37 loadBalancer:
38 # Option 1: Operator-managed Envoy load balancer
39 managed:
40 externalHostname: "search.apps.example.com"
41 resourceRequirements:
42 requests:
43 cpu: "100m"
44 memory: 128Mi
45 limits:
46 cpu: "500m"
47 memory: 512Mi
48 deployment:
49 spec:
50 template:
51 spec:
52 nodeSelector:
53 kubernetes.io/os: linux
54 # Option 2: User-provided (BYO) load balancer
55 # (mutually exclusive with managed)
56 unmanaged:
57 endpoint: "search-lb.corp.example.com:443"
58 security:
59 tls:
60 certificateKeySecretRef:
61 name: mdbs-tls-secret
62 certsSecretPrefix: my-prefix
63 resourceRequirements:
64 limits:
65 cpu: "3"
66 memory: 5Gi
67 requests:
68 cpu: "2"
69 memory: 3Gi
70 persistence:
71 single:
72 storage: 16Gi
73 storageClass: standard
74 version: "0.64.0"
75 statefulSet:
76 spec:
77 template:
78 spec:
79 nodeSelector:
80 kubernetes.io/os: linux
81 jvmFlags:
82 - -Xms2g
83 - -Xmx2g
84 autoEmbedding:
85 embeddingModelAPIKeySecret:
86 name: embedding-model-api-query-key
87 providerEndpoint: https://ai.mongodb.com/v1/embeddings
88 logLevel: INFO
89 prometheus: {}

This section describes the settings that are required for deploying the MongoDB Search and Vector Search resource. If you define only the required settings in the Custom Resource Definition (CRD), the MongoDB Controllers for Kubernetes Operator uses the defaults for all optional settings to configure MongoDBSearch.

apiVersion

Type: string

Version of the MongoDB Kubernetes resource schema. Set the value to mongodb.com/v1.

kind

Type: string

Kind of MongoDB Kubernetes resource to create. Set this to MongoDBSearch.

metadata.namespace

Type: string

Namespace where the MongoDBSearch resource should be created. To leverage automatic configuration of MongoDBSearch and MongoDB or MongoDBCommunity resources, the MongoDBSearch resource should be created in the same namespace as the MongoDB or MongoDBCommunity resource.

metadata.name

Type: string

Unique identifier of the MongoDBSearch resource. The resource name can be a maximum of 44 characters in length.

This section describes the optional settings for the MongoDB Search and Vector Search resource. If you omit the optional settings and define only the required settings in the CRD, the MongoDB Controllers for Kubernetes Operator uses the defaults for all optional settings to configure MongoDBSearch.

spec.source

Type: object

Setting that describes the MongoDB source for mongot. The source can be a replica set or a sharded cluster. This setting is required if:

  • MongoDB is external

  • MongoDB has a different name from MongoDBSearch

The MongoDBSearch resource must always be connected to a MongoDB deployment. If you deployed using the Kubernetes Operator with MongoDB or MongoDBCommunity CRD, and if spec.source is empty, the Kubernetes Operator uses the following based on the metadata.name to look for the database in Kubernetes:

  • Find MongoDB or MongoDBCommunity resources with the same name as set for metadata.name in MongoDBSearch, in the same namespace.

  • Find the password secret for the mongot user from the <MongoDBSearch.metadata.name>-search-sync-source-password secret.

spec.source.mongodbResourceRef.name

Type: string

Name of the MongoDB or MongoDBCommunity resource to associate with this MongoDB Search and Vector Search resource. The Kubernetes Operator supports both replica sets and sharded clusters. You can't have more than one MongoDBSearch resource referencing the same MongoDB or MongoDBCommunity resource. If you specify a different name, you must explicitly point to the MongoDB or MongoDBCommunity where you want to enable MongoDB Search and Vector Search.

If you reference a sharded cluster MongoDB resource, the Kubernetes Operator auto-discovers the shard topology (shard names, replica set members, mongos routers) and creates per-shard mongot StatefulSets automatically. You don't need to perform any additional external configuration.

Use this field only if your MongoDB or MongoDBCommunity resource is deployed in the same Kubernetes cluster and is in the same namespace as your MongoDBSearch resource. If you set this field, the Kubernetes Operator automatically:

  • Sets proper connection strings to the database.

  • Reconfigures MongoDB database deployments by setting necessary parameters to enable search functionality and configures the addresses of the search pods.

If your database is deployed outside of Kubernetes or is in a different namespace, use spec.external to configure connection to the database. This field is mutually exclusive with spec.external.

If omitted, the Kubernetes Operator looks for a MongoDB or MongoDBCommunity resource with the same name as this MongoDBSearch resource.

spec.source.username

Type: string

Username to use to authenticate mongot with mongod. The specified user must have the searchCoordinator role. If omitted, the Kubernetes Operator assumes the username is search-sync-source.

spec.source.passwordSecretRef.name

Type: string

Name of the secret that contains the password that mongot must use to authenticate with mongod. If omitted, defaults to <MongoDBSearch.metadata.name>-search-sync-source-password.

spec.source.passwordSecretRef.key

Type: string

Key under which the password value is stored in the secret. If omitted, defaults to password.

spec.source.x509

Type: object

Configures x509 client certificate authentication for the mongot sync source connection. If you set this field, mongot authenticates to MongoDB using x509 instead of username and password.

This field is mutually exclusive with spec.source.passwordSecretRef and spec.source.username. The Kubernetes Operator rejects the configuration if you specify both x509 and password authentication.

spec.source.x509.clientCertificateSecretRef

Type: object

Secret that contains the x509 client certificate and key for authenticating to the MongoDB sync source. The Secret must contain the following keys:

  • tls.crt — Client certificate (required)

  • tls.key — Private key (required)

  • tls.keyFilePassword — Password for the private key (optional)

You must specify this field if you set spec.source.x509.

Example

spec:
source:
x509:
clientCertificateSecretRef:
name: mongot-x509-client-cert

The following settings are required only for configuring a connection to an external MongoDB deployment.

spec.source.external

Type: object

Settings that describe the external data source. This object describes the settings for the MongoDB Search and Vector Search resource to connect to an external MongoDB. These settings should be specified only if you want to connect to an external MongoDB that wasn't deployed using the Kubernetes Operator. If specified, these settings override settings for spec.source.mongodbResourceRef.name. If you used the Kubernetes Operator to install MongoDB in the same cluster, these settings are optional.

spec.source.external.hostAndPorts

Type: array of strings

List of hostnames and ports of the external replica set. This is a host seed list to the MongoDB replica set. The mongot connects to the database in a replica set mode and gets the list of all other nodes using db.hello().

This field is mutually exclusive with spec.source.external.shardedCluster. Use hostAndPorts for replica set sources and shardedCluster for sharded cluster sources.

Example

hostAndPorts:
- mdbc-rs-0.my-external-domain.example.com:27017
- mdbc-rs-1.my-external-domain.example.com:27017
- mdbc-rs-2.my-external-domain.example.com:27017
spec.source.external.tls

Type: object

TLS Settings that mongot must use when connecting to the external MongoDB database.

spec.source.external.tls.ca.name

Type: string

Name of the Secret containing the trusted chain of the certificate authorities that issued the TLS certificate used by the mongod nodes.

Example

spec:
source:
external:
tls:
ca:
name: trusted-ca

You must specify the certificate (or certificate chain) under the ca.crt key in this Secret.

Example

name: Secret
apiVersion: v1
metadata:
name: trusted-ca
data:
ca.crt: |
-----BEGIN CERTIFICATE-----
MIIDBTCCAe2gAwIBAgIIH3EOUAGAsx0wDQYJKoZIhvcNAQELBQAwFTETMBEGA1UE
[...]
U/4rN8Ias/FONYFRtGfs9uXHmo2MP04BF+9ED2dlbNDUbat+6XCozLJj98nI4VEi
qaV3JrVFHTgN
-----END CERTIFICATE-----

The following settings are required only for configuring a connection to an external MongoDB sharded cluster. They extend the existing spec.source.external settings.

Note

spec.source.external.hostAndPorts (for replica sets) and spec.source.external.shardedCluster are mutually exclusive. Specify only one of them.

spec.source.external.shardedCluster

Type: object

Declares an external sharded MongoDB cluster as the data source for mongot. Contains configuration for mongos routers and per-shard replica set members.

Use this only if the MongoDB sharded cluster is deployed outside of Kubernetes and is not managed by the Kubernetes Operator. For operator-managed sharded clusters deployed with the MongoDB CRD, use spec.source.mongodbResourceRef instead. The Kubernetes Operator auto-discovers shard topology.

Example

spec:
source:
external:
shardedCluster:
router:
hosts:
- "mongos1.external:27017"
- "mongos2.external:27017"
shards:
- shardName: "shard-0"
hosts:
- "shard0-node1.external:27018"
- "shard0-node2.external:27018"
- shardName: "shard-1"
hosts:
- "shard1-node1.external:27018"
- "shard1-node2.external:27018"
spec.source.external.shardedCluster.router

Type: object

Configuration for the mongos (router) instances of the external sharded cluster.

spec.source.external.shardedCluster.router.hosts

Type: array of strings

List of endpoints for the mongos router instances in host:port format. All mongot instances connect to these routers. Specify at least one entry.

Example

router:
hosts:
- "mongos1.external:27017"
- "mongos2.external:27017"
spec.source.external.shardedCluster.shards

Type: array of objects

List of all shards in the external MongoDB cluster. Each entry describes one shard's replica set. The Kubernetes Operator creates one mongot StatefulSet for each shard, where each StatefulSet contains the number of pods specified in spec.replicas. Specify at least one shard entry.

spec.source.external.shardedCluster.shards[*].shardName

Type: string

The logical name of the shard. The Kubernetes Operator uses this name for Kubernetes resource naming (StatefulSets, Services, Secrets). The value can be different from the MongoDB shard name.

Naming constraints:

  • Must be unique across all shards.

  • Must conform to Kubernetes DNS subdomain name rules (RFC 1123), which allow lowercase alphanumeric characters, hyphen (-), and period (.), and require that the name start with an alphabetic character and end with an alphanumeric character. Underscores (_) are not allowed.

  • The combined length of metadata.name and shardName must be less than 50 characters.

Example

shards:
- shardName: "shard-0"
hosts:
- "shard0-node1.external:27018"
spec.source.external.shardedCluster.shards[*].hosts

Type: array of strings

List of endpoints of the mongod replica set members for this shard in the host:port format. mongot instances replicate data from these hosts. Specify at least one entry.

Each replica set (shard) has its own group of mongot instances, which source data only from that replica set. Different shards never share the same mongot instances.

Example

shards:
- shardName: "shard-0"
hosts:
- "shard0-node1.external:27018"
- "shard0-node2.external:27018"
- "shard0-node3.external:27018"
spec.security

Type: object

Security settings for mongot listen server.

spec.security.tls

Type: object

TLS settings for mongot. If omitted, mongot won't use TLS for incoming connections.

spec.security.tls.certificateKeySecretRef.name

Type: string

Deprecated since version 1.8.0: Use spec.security.tls.certsSecretPrefix instead.

Name of the TLS secret in the same namespace containing the private key (tls.key) and the certificate (tls.crt). The secret can be of type kubernetes.io/tls (that is issued by cert-manager) or can be created manually.

The Kubernetes Operator still supports this field for replica set deployments for backwards compatibility. However:

  • For sharded cluster deployments, the Kubernetes Operator rejects this field during validation. Use spec.security.tls.certsSecretPrefix instead, because a single secret reference cannot cover per-shard certificates.

  • If you specify both certificateKeySecretRef and certsSecretPrefix, certificateKeySecretRef takes precedence for replica set deployments.

For new deployments, use spec.security.tls.certsSecretPrefix even for replica sets.

spec.security.tls.certsSecretPrefix

Type: string

Prefix that the Kubernetes Operator uses to derive TLS secret names by naming convention. If you set this field, the Kubernetes Operator looks for secrets following these patterns instead of requiring explicit secret references for each component:

Component
Secret Name Pattern

Replica set's mongot server cert

{certsSecretPrefix}-{name}-search-cert

Sharded mongot cert (per shard)

{certsSecretPrefix}-{name}-search-0-{shardName}-cert

Managed load balancer server cert

{certsSecretPrefix}-{name}-search-lb-0-cert

Managed load balancer client cert

{certsSecretPrefix}-{name}-search-lb-0-client-cert

Where:

  • {name} is metadata.name of the MongoDBSearch resource

  • {shardName} is the value of spec.source.external.shardedCluster.shards[*].shardName

If omitted, this field defaults to an empty string and the Kubernetes Operator uses spec.security.tls.certificateKeySecretRef instead.

Note

For sharded cluster deployments, you must use certsSecretPrefix instead of certificateKeySecretRef. The Kubernetes Operator rejects certificateKeySecretRef for sharded topologies because a single secret reference cannot cover per-shard certificates.

Example

spec:
security:
tls:
certsSecretPrefix: my-prefix
spec.replicas

Type: integer

Number of mongot pods to deploy. For a replica set source, this is the total number of mongot pods. For a sharded cluster source, this is the number of mongot pods per shard.

If spec.replicas is greater than 1, you must also configure spec.loadBalancer to route traffic between mongod and the multiple mongot instances.

If omitted, defaults to 1.

Example

spec:
replicas: 2
spec.loadBalancer

Type: object

Configuration for L7 load balancing between mongod (or mongos) and mongot. This field is required if spec.replicas is greater than 1. If spec.replicas is 1, this field is optional. You can configure a load balancer even for a single mongot instance to prepare for scaling up later.

Exactly one of managed or unmanaged must be set.

The load balancer affects which TLS certificates mongod clients see and which hostnames those certificates must contain:

  • Without a load balancer, mongod connects directly to mongot. The TLS certificate presented to mongod is mongot's own certificate. If the MongoDB cluster is outside of Kubernetes, the mongot service is exposed on an external domain. You must include that external domain in the mongot TLS certificate's SAN (Subject Alternative Name) field.

  • With a managed load balancer (spec.loadBalancer.managed), the Envoy proxy is the only component that connects directly to mongot. Envoy reaches mongot pods using their internal headless Service FQDNs:

    • Replica set: <pod>.<name>-search-svc.<ns>.svc.cluster.local

    • Sharded cluster: <pod>.<name>-search-0-<shard>-svc.<ns>.svc.cluster.local

    Issue the mongot TLS certificate with these cluster-local domains in the SAN field. You can use a wildcard certificate to avoid re-issuing certificates when the number of mongot pods changes. External mongod processes see the Envoy proxy's TLS certificate, so include external domains in the Envoy certificate's SANs, not in the mongot certificate.

Tip

Enable a managed load balancer even if you initially deploy a single mongot pod. With the load balancer in place, the domains in your TLS certificates remain stable if you scale up spec.replicas later because the load balancer is already present between mongod and mongot.

spec.loadBalancer.managed

Type: object

Configures an operator-managed Envoy load balancer. The Kubernetes Operator deploys and manages the Envoy proxy with correct routing, mTLS, and HTTP/2+gRPC stream pinning. Set this field to an empty object ({}) to use the defaults.

This field is mutually exclusive with spec.loadBalancer.unmanaged.

Example

spec:
loadBalancer:
managed: {}
spec.loadBalancer.managed.externalHostname

Type: string

Hostname that the Envoy proxy expects for SNI matching on incoming requests. The Kubernetes Operator uses this value to configure routing rules that match the TLS SNI field from incoming mongod connections. The Envoy TLS server certificate must include this hostname in its SAN (Subject Alternative Name) field.

For sharded clusters, the value must contain a {shardName} placeholder that the Kubernetes Operator expands per shard. Each shard gets a unique hostname, and the Envoy TLS server certificate must include all expanded shard hostnames in its SANs. You can use a wildcard certificate to cover all shards with a single certificate and avoid re-issuing when shards are added.

This field is required if MongoDB is externally managed (not deployed by the Kubernetes Operator). If MongoDB is operator-managed in the same cluster, omit this field because the Kubernetes Operator auto-configures routing.

Example

# Replica set with external MongoDB
spec:
loadBalancer:
managed:
externalHostname: "search.apps.example.com"
# Sharded cluster with external MongoDB
spec:
loadBalancer:
managed:
externalHostname: "{shardName}.search.example.com"
spec.loadBalancer.managed.resourceRequirements

Type: core/v1/ResourceRequirements

CPU and memory that the Envoy container can request and be limited to. If you specify this setting, the Kubernetes Operator replaces the defaults entirely.

If omitted, the Kubernetes Operator uses the following default values:

requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 500m
memory: 512Mi

Example

spec:
loadBalancer:
managed:
resourceRequirements:
requests:
cpu: "200m"
memory: "256Mi"
limits:
cpu: "1"
memory: "1Gi"
spec.loadBalancer.managed.deployment

Type: object

Overrides that the Kubernetes Operator merges into the operator-created Envoy Deployment. Follows the same convention as spec.statefulSet on MongoDB resources. If omitted, the Kubernetes Operator uses defaults for the Envoy Deployment.

This object contains two fields:

  • metadata — contains labels and annotations fields that the Kubernetes Operator merges into the Envoy Deployment metadata.

  • spec — an apps/v1/DeploymentSpec object. The Kubernetes Operator merges these overrides into the Envoy Deployment spec.

Example

spec:
loadBalancer:
managed:
deployment:
spec:
template:
spec:
nodeSelector:
kubernetes.io/os: linux
spec.loadBalancer.unmanaged

Type: object

Configures a user-provided (Bring Your Own) L7 load balancer. You are responsible for deploying and configuring the load balancer externally.

This field is mutually exclusive with spec.loadBalancer.managed.

spec.loadBalancer.unmanaged.endpoint

Type: string

The endpoint of the BYO load balancer in host:port format. The Kubernetes Operator writes this value into the mongod configuration as mongotHost and searchIndexManagementHostAndPort.

This field is required only when the Kubernetes Operator manages the MongoDB deployment (using spec.source.mongodbResourceRef), because the Kubernetes Operator needs the endpoint to configure mongod parameters. If both the load balancer and MongoDB are external (not managed by the Kubernetes Operator), this field is not required because you configure mongod parameters yourself.

For sharded clusters, the value must contain a {shardName} placeholder that the Kubernetes Operator expands per shard.

Example

# Replica set example
spec:
loadBalancer:
unmanaged:
endpoint: "search-lb.corp.example.com:443"
# Sharded cluster example
spec:
loadBalancer:
unmanaged:
endpoint: "{shardName}-lb.corp.example.com:443"
spec.resourceRequirements

Type: core/v1/ResourceRequirements

CPU and memory that the mongodb-search container can request and be limited to. We recommend using this field to customize resource allocations instead of overriding it with spec.statefulSet.

If you do not override the JVM heap size in spec.jvmFlags, the Kubernetes Operator sets the default heap size (-Xmx) to 50% of the memory available to the mongot pod. Adjust spec.resourceRequirements accordingly to control both pod resources and JVM heap size.

If omitted, the Kubernetes Operator uses the following default values:

requests:
cpu: 2
memory: 2G
spec.resourceRequirements.limits

Type: object

Upper cap on the resource, CPU and memory, that the mongodb-search container can consume. By default, there are no limits set. If omitted, the pod isn't restricted and so, might use all the resources on the node. We recommend setting limits based on your workload.

spec.resourceRequirements.requests

Type: object

Amount of CPU and memory requested for the mongodb-search container. If omitted, the Kubernetes Operator uses the following default values:

requests:
cpu: 2
memory: 2G
spec.persistence.single

Type: object

Storage configuration for MongoDB Search and Vector Search persistence volume where MongoDB Search and Vector Search indexes are stored. Each search instance (pod) has its own independent storage to maintain indexes, which isn't shared with the MongoDB database. Only index metadata (definitions) are stored in the database itself.

Scalar
Data Type
Description

labelSelector

string

Tag used to bind mounted volumes to directories.

storage

string

Minimum size of Persistent Volume that should be mounted. This value is expressed as an integer followed by a unit of storage in JEDEC notation.

Default value is 16Gi.

For example, if replica set requires 60 gigabytes of storage space, set this value to 60Gi.

storageClass

string

Type of storage specified in a Persistent Volume Claim. You may create this storage type as a StorageClass object before using it in this object specification.

Make sure to set the StorageClass reclaimPolicy to Retain. This ensures that data is retained when a Persistent Volume Claim is removed.

MongoDBSearch supports only single persistence field. If omitted, the Kubernetes Operator sets spec.persistence.single.storage to 10GB.

spec.logLevel

Type: string

Verbosity of the mongot logs. Value can be one of the following:

  • TRACE

  • DEBUG

  • INFO

  • WARN

  • ERROR

If omitted, defaults to INFO.

spec.prometheus

Type: object

This is available only in v1.6 and later.

Configuration to enable Prometheus metrics endpoint. If omitted, the metrics endpoint in mongot is disabled. To enable Prometheus metrics endpoint on the default port (9946), specify an empty {} object in the spec.prometheus field. To change the port, set it in spec.prometheus.port field.

spec.prometheus.port

Type: string

Port on which to enable Prometheus metrics endpoint. By default, Prometheus metrics endpoint is enabled on port 9946.

Important

Automated embedding is available as a Preview feature for only MongoDB Community Edition deployment. The feature and corresponding documentation might change at any time during the Preview period. To learn more, see Preview Features.

spec.autoEmbedding

Type: Object

Configuration for Automated Embedding for text data in your collection.

spec.autoEmbedding.embeddingModelAPIKeySecret

Type: Object

Configuration for the embedding model provider API keys. To enable Automated Embedding, you must create two keys, one for generating embeddings at index-time for data in your collection and another for generating embeddings at query-time for the query text. If you don't already have the keys, we recommend that you create keys from two Atlas projects. To learn more about creating keys for the Atlas projects from the Atlas UI, see Manage API Keys.

spec.autoEmbedding.embeddingModelAPIKeySecret.name

Type: string

Name of the secret that contains the embedding model API keys that mongot must use to generate embeddings at index- and query-time.

spec.autoEmbedding.providerEndpoint

Type: string

Embedding model endpoint URL for generating embeddings. Value varies based on whether you create the keys from the Atlas UI (recommended) or directly from the embedding service (Voyage AI). For keys created from:

  • Atlas UI, value is https://ai.mongodb.com/v1/embeddings (default)

  • Voyage AI, value is https://api.voyageai.com/v1/embeddings

spec.jvmFlags

Type: array of strings

JVM flags passed to the mongot process. The Kubernetes Operator includes the flags without modification in the mongot startup command using --jvm-flags "<all flags space-separated>".

If you don't specify -Xms or -Xmx in this field, the Kubernetes Operator auto-calculates heap size by setting both to half of spec.resourceRequirements.requests.memory. If you don't specify resource requirements, the Kubernetes Operator uses a default of 4Gi memory request, yielding approximately -Xmx2048m -Xms2048m.

If you provide your own -Xms or -Xmx values, the Kubernetes Operator uses them and does not override the values. The Kubernetes Operator always appends the flags you provide after the operator-computed flags.

To learn more, see Hardware Sizing for mongot.

Example

spec:
jvmFlags:
- -Xms2g
- -Xmx2g
spec.version

Type: string

Version of mongodb-search docker image. If omitted, the Kubernetes Operator automatically chooses the newest version of MongoDBSearch. You can set it explicitly to prevent automatic upgrades when the Kubernetes Operator version is upgraded.

spec.statefulSet

Type: apps/v1/StatefulSet

Specification for the StatefulSet, created for deploying mongot pods, that overwrites the settings that the Kubernetes Operator applies. The overrides are always applied last. Supports both the spec.statefulSet.spec and spec.statefulSet.metadata fields.

Note

Don't set resource requirements or persistence settings using spec.statefulSet. Instead, use the spec.resourceRequirements and spec.persistence fields respectively.

The Kubernetes Operator reports status information under the status field of the MongoDBSearch resource.

status.loadBalancer

Type: object

Status of the operator-managed load balancer (Envoy). This field is present only when spec.loadBalancer.managed is set.

status.loadBalancer.phase

Type: string

Current phase of the managed load balancer. Possible values include Pending, Running, and Failed. The Kubernetes Operator reports this phase independently of the main status.phase, so you can monitor the Envoy deployment separately.

This field is also visible in kubectl get output under the LOADBALANCER column.

Example

$ kubectl get mdbs
NAME PHASE VERSION LOADBALANCER AGE
mdb-rs-ext-lb-search Running 0.64.0 Running 14m

Back

CRD Log Rotation Settings