You can deploy MongoDB Search and Vector Search alongside MongoDB 8.2 or later using MongoDB Controllers for Kubernetes Operator.
Example Resource Specification
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
1 spec: 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: {}
Required Settings
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.
apiVersionType: string
Version of the MongoDB Kubernetes resource schema. Set the value to
mongodb.com/v1.
kindType: string
Kind of MongoDB Kubernetes resource to create. Set this to MongoDBSearch.
metadata.namespaceType: string
Namespace where the MongoDBSearch resource should be created. To leverage automatic configuration of MongoDBSearch and
MongoDBorMongoDBCommunityresources, the MongoDBSearch resource should be created in the same namespace as theMongoDBorMongoDBCommunityresource.
metadata.nameType: string
Unique identifier of the MongoDBSearch resource. The resource name can be a maximum of 44 characters in length.
Optional Settings
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.
Settings for Configuring the Data Source
spec.sourceType: 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:MongoDBis externalMongoDBhas a different name from MongoDBSearch
The MongoDBSearch resource must always be connected to a MongoDB deployment. If you deployed using the Kubernetes Operator with
MongoDBorMongoDBCommunityCRD, and ifspec.sourceis empty, the Kubernetes Operator uses the following based on themetadata.nameto look for the database in Kubernetes:Find
MongoDBorMongoDBCommunityresources with the same name as set formetadata.namein MongoDBSearch, in the same namespace.Find the password secret for the
mongotuser from the<MongoDBSearch.metadata.name>-search-sync-source-passwordsecret.
spec.source.mongodbResourceRef.nameType: string
Name of the
MongoDBorMongoDBCommunityresource 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 sameMongoDBorMongoDBCommunityresource. If you specify a different name, you must explicitly point to theMongoDBorMongoDBCommunitywhere you want to enable MongoDB Search and Vector Search.If you reference a sharded cluster
MongoDBresource, the Kubernetes Operator auto-discovers the shard topology (shard names, replica set members,mongosrouters) and creates per-shardmongotStatefulSets automatically. You don't need to perform any additional external configuration.Use this field only if your
MongoDBorMongoDBCommunityresource 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.externalto configure connection to the database. This field is mutually exclusive withspec.external.If omitted, the Kubernetes Operator looks for a
MongoDBorMongoDBCommunityresource with the same name as this MongoDBSearch resource.
Setting for Configuring mongot User
spec.source.usernameType: string
Username to use to authenticate
mongotwithmongod. The specified user must have thesearchCoordinatorrole. If omitted, the Kubernetes Operator assumes the username issearch-sync-source.
spec.source.passwordSecretRef.nameType: string
Name of the secret that contains the password that
mongotmust use to authenticate withmongod. If omitted, defaults to<MongoDBSearch.metadata.name>-search-sync-source-password.
spec.source.passwordSecretRef.keyType: string
Key under which the password value is stored in the secret. If omitted, defaults to
password.
Settings for x509 Authentication
spec.source.x509Type: object
Configures x509 client certificate authentication for the
mongotsync source connection. If you set this field,mongotauthenticates to MongoDB using x509 instead of username and password.This field is mutually exclusive with
spec.source.passwordSecretRefandspec.source.username. The Kubernetes Operator rejects the configuration if you specify both x509 and password authentication.
spec.source.x509.clientCertificateSecretRefType: 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
Settings for Connecting to External MongoDB
The following settings are required only for configuring a connection to an external MongoDB deployment.
spec.source.externalType: 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.
Settings for Connecting to an External Replica Set
spec.source.external.hostAndPortsType: 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
mongotconnects to the database in a replica set mode and gets the list of all other nodes usingdb.hello().This field is mutually exclusive with
spec.source.external.shardedCluster. UsehostAndPortsfor replica set sources andshardedClusterfor 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.tlsType: object
TLS Settings that
mongotmust use when connecting to the external MongoDB database.
spec.source.external.tls.ca.nameType: string
Name of the Secret containing the trusted chain of the certificate authorities that issued the TLS certificate used by the
mongodnodes.Example
spec: source: external: tls: ca: name: trusted-ca You must specify the certificate (or certificate chain) under the
ca.crtkey 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-----
Settings for Connecting to an External Sharded Cluster
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.shardedClusterType: object
Declares an external sharded MongoDB cluster as the data source for
mongot. Contains configuration formongosrouters 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
MongoDBCRD, usespec.source.mongodbResourceRefinstead. 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.routerType: object
Configuration for the
mongos(router) instances of the external sharded cluster.
spec.source.external.shardedCluster.router.hostsType: array of strings
List of endpoints for the
mongosrouter instances inhost:portformat. Allmongotinstances connect to these routers. Specify at least one entry.Example
router: hosts: - "mongos1.external:27017" - "mongos2.external:27017"
spec.source.external.shardedCluster.shardsType: 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
mongotStatefulSet for each shard, where each StatefulSet contains the number of pods specified inspec.replicas. Specify at least one shard entry.
spec.source.external.shardedCluster.shards[*].shardNameType: 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.nameandshardNamemust be less than 50 characters.
Example
shards: - shardName: "shard-0" hosts: - "shard0-node1.external:27018"
spec.source.external.shardedCluster.shards[*].hostsType: array of strings
List of endpoints of the
mongodreplica set members for this shard in thehost:portformat.mongotinstances replicate data from these hosts. Specify at least one entry.Each replica set (shard) has its own group of
mongotinstances, which source data only from that replica set. Different shards never share the samemongotinstances.Example
shards: - shardName: "shard-0" hosts: - "shard0-node1.external:27018" - "shard0-node2.external:27018" - "shard0-node3.external:27018"
Settings for Security
spec.securityType: object
Security settings for
mongotlisten server.
spec.security.tlsType: object
TLS settings for
mongot. If omitted,mongotwon't use TLS for incoming connections.
spec.security.tls.certificateKeySecretRef.nameType: string
Deprecated since version 1.8.0: Use
spec.security.tls.certsSecretPrefixinstead.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 typekubernetes.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.certsSecretPrefixinstead, because a single secret reference cannot cover per-shard certificates.If you specify both
certificateKeySecretRefandcertsSecretPrefix,certificateKeySecretReftakes precedence for replica set deployments.
For new deployments, use
spec.security.tls.certsSecretPrefixeven for replica sets.
spec.security.tls.certsSecretPrefixType: 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:
ComponentSecret Name PatternReplica set's
mongotserver cert{certsSecretPrefix}-{name}-search-certSharded
mongotcert (per shard){certsSecretPrefix}-{name}-search-0-{shardName}-certManaged load balancer server cert
{certsSecretPrefix}-{name}-search-lb-0-certManaged load balancer client cert
{certsSecretPrefix}-{name}-search-lb-0-client-certWhere:
{name}ismetadata.nameof the MongoDBSearch resource{shardName}is the value ofspec.source.external.shardedCluster.shards[*].shardName
If omitted, this field defaults to an empty string and the Kubernetes Operator uses
spec.security.tls.certificateKeySecretRefinstead.Note
For sharded cluster deployments, you must use
certsSecretPrefixinstead ofcertificateKeySecretRef. The Kubernetes Operator rejectscertificateKeySecretReffor sharded topologies because a single secret reference cannot cover per-shard certificates.Example
spec: security: tls: certsSecretPrefix: my-prefix
Settings for Multiple Mongot Instances
spec.replicasType: integer
Number of
mongotpods to deploy. For a replica set source, this is the total number ofmongotpods. For a sharded cluster source, this is the number ofmongotpods per shard.If
spec.replicasis greater than1, you must also configurespec.loadBalancerto route traffic betweenmongodand the multiplemongotinstances.If omitted, defaults to
1.Example
spec: replicas: 2
Settings for Load Balancing
spec.loadBalancerType: object
Configuration for L7 load balancing between
mongod(ormongos) andmongot. This field is required ifspec.replicasis greater than1. Ifspec.replicasis1, this field is optional. You can configure a load balancer even for a singlemongotinstance to prepare for scaling up later.Exactly one of
managedorunmanagedmust be set.The load balancer affects which TLS certificates
mongodclients see and which hostnames those certificates must contain:Without a load balancer,
mongodconnects directly tomongot. The TLS certificate presented tomongodismongot's own certificate. If the MongoDB cluster is outside of Kubernetes, themongotservice is exposed on an external domain. You must include that external domain in themongotTLS 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 tomongot. Envoy reachesmongotpods using their internal headless Service FQDNs:Replica set:
<pod>.<name>-search-svc.<ns>.svc.cluster.localSharded cluster:
<pod>.<name>-search-0-<shard>-svc.<ns>.svc.cluster.local
Issue the
mongotTLS certificate with these cluster-local domains in the SAN field. You can use a wildcard certificate to avoid re-issuing certificates when the number ofmongotpods changes. Externalmongodprocesses see the Envoy proxy's TLS certificate, so include external domains in the Envoy certificate's SANs, not in themongotcertificate.
Tip
Enable a managed load balancer even if you initially deploy a single
mongotpod. With the load balancer in place, the domains in your TLS certificates remain stable if you scale upspec.replicaslater because the load balancer is already present betweenmongodandmongot.
spec.loadBalancer.managedType: 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.externalHostnameType: 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
mongodconnections. 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.resourceRequirementsType: 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.deploymentType: object
Overrides that the Kubernetes Operator merges into the operator-created Envoy Deployment. Follows the same convention as
spec.statefulSeton MongoDB resources. If omitted, the Kubernetes Operator uses defaults for the Envoy Deployment.This object contains two fields:
metadata— containslabelsandannotationsfields 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.unmanagedType: 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.endpointType: string
The endpoint of the BYO load balancer in
host:portformat. The Kubernetes Operator writes this value into themongodconfiguration asmongotHostandsearchIndexManagementHostAndPort.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 configuremongodparameters. If both the load balancer and MongoDB are external (not managed by the Kubernetes Operator), this field is not required because you configuremongodparameters 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"
Settings for Provisioning Resources
spec.resourceRequirementsType: core/v1/ResourceRequirements
CPU and memory that the
mongodb-searchcontainer can request and be limited to. We recommend using this field to customize resource allocations instead of overriding it withspec.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 themongotpod. Adjustspec.resourceRequirementsaccordingly 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.limitsType: object
Upper cap on the resource, CPU and memory, that the
mongodb-searchcontainer 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.requestsType: object
Amount of CPU and memory requested for the
mongodb-searchcontainer. If omitted, the Kubernetes Operator uses the following default values:requests: cpu: 2 memory: 2G
spec.persistence.singleType: 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.
ScalarData TypeDescriptionlabelSelectorstring
Tag used to bind mounted volumes to directories.
storagestring
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.storageClassstring
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
reclaimPolicyto Retain. This ensures that data is retained when a Persistent Volume Claim is removed.MongoDBSearch supports only
singlepersistence field. If omitted, the Kubernetes Operator setsspec.persistence.single.storageto10GB.
Settings for Logging
spec.logLevelType: string
Verbosity of the
mongotlogs. Value can be one of the following:TRACEDEBUGINFOWARNERROR
If omitted, defaults to
INFO.
Settings for Metrics
spec.prometheusType: object
This is available only in v1.6 and later.
Configuration to enable Prometheus metrics endpoint. If omitted, the metrics endpoint in
mongotis disabled. To enable Prometheus metrics endpoint on the default port (9946), specify an empty{}object in thespec.prometheusfield. To change the port, set it inspec.prometheus.portfield.
spec.prometheus.portType: string
Port on which to enable Prometheus metrics endpoint. By default, Prometheus metrics endpoint is enabled on port
9946.
Settings for Automated Embedding
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.autoEmbeddingType: Object
Configuration for Automated Embedding for text data in your collection.
spec.autoEmbedding.embeddingModelAPIKeySecretType: 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.nameType: string
Name of the secret that contains the embedding model API keys that
mongotmust use to generate embeddings at index- and query-time.
spec.autoEmbedding.providerEndpointType: 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
Settings for JVM Configuration
spec.jvmFlagsType: array of strings
JVM flags passed to the
mongotprocess. The Kubernetes Operator includes the flags without modification in themongotstartup command using--jvm-flags "<all flags space-separated>".If you don't specify
-Xmsor-Xmxin this field, the Kubernetes Operator auto-calculates heap size by setting both to half ofspec.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
-Xmsor-Xmxvalues, 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
Other Settings
spec.versionType: string
Version of
mongodb-searchdocker 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.statefulSetType: apps/v1/StatefulSet
Specification for the StatefulSet, created for deploying
mongotpods, that overwrites the settings that the Kubernetes Operator applies. The overrides are always applied last. Supports both thespec.statefulSet.specandspec.statefulSet.metadatafields.Note
Don't set resource requirements or persistence settings using
spec.statefulSet. Instead, use thespec.resourceRequirementsandspec.persistencefields respectively.
Status Fields
The Kubernetes Operator reports status information under the
status field of the MongoDBSearch resource.
status.loadBalancerType: object
Status of the operator-managed load balancer (Envoy). This field is present only when
spec.loadBalancer.managedis set.
status.loadBalancer.phaseType: string
Current phase of the managed load balancer. Possible values include
Pending,Running, andFailed. The Kubernetes Operator reports this phase independently of the mainstatus.phase, so you can monitor the Envoy deployment separately.This field is also visible in
kubectl getoutput under theLOADBALANCERcolumn.Example
kubectl get mdbs NAME PHASE VERSION LOADBALANCER AGE mdb-rs-ext-lb-search Running 0.64.0 Running 14m