MongoDB.local SF, Jan 15: See the speaker lineup & ship your AI vision faster. Use WEB50 to save 50%
Find out more >
Docs Menu
Docs Home
/ /
/ / /

AtlasDeployment Custom Resource

Important

Migration to Flex Clusters

  • Atlas deprecated M2 and M5 clusters and Serverless instances. Atlas will automatically migrate all M2 and M5 clusters to Flex clusters. For Serverless instances, Atlas will determine whether to migrate instances to Free clusters, Flex clusters, or Dedicated clusters according to your usage, then migrate your Serverless instances automatically. To see which tiers Atlas will migrate your instances to, consult the All Clusters page in the Atlas UI. To learn more, see the Flex Migration Guide in the Atlas documentation.

  • Replace references to spec.serverlessSpec with configuration for spec.flexSpec.

  • Atlas Kubernetes Operator rejects new AtlasDeployment custom resources that define spec.serverlessSpec. You can only use spec.serverlessSpec to manage existing Serverless instances.

Important

Action Required for Breaking Changes with Atlas Kubernetes Operator 2.0

  • With Atlas Kubernetes Operator 2.0, deploymentSpec replaces advancedDeploymentSpec in the AtlasDeployment custom resource. You must update your AtlasDeployment custom resource as follows:

    • If you use advancedDeploymentSpec, rename it to deploymentSpec. You don't need to change any formatting.

    • If you used deploymentSpec prior to Atlas Kubernetes Operator 2.0, rewrite your AtlasDeployment custom resource to match the formatting used in the examples.

  • Atlas Kubernetes Operator uses custom resource configuration files to manage your Atlas configuration. As of Atlas Kubernetes Operator 2.0, custom resources you delete in Kubernetes are no longer deleted in Atlas. Instead, Atlas Kubernetes Operator simply stops managing those resources. For example, if you delete an AtlasProject Custom Resource in Kubernetes, Atlas Kubernetes Operator no longer automatically deletes the corresponding project from Atlas, preventing accidental or unexpected deletions. To learn more, including how to revert this behavior to the default used prior to Atlas Kubernetes Operator 2.0, see New Default: Deletion Protection in Atlas Kubernetes Operator 2.0.

The AtlasDeployment custom resource configures your MongoDB cluster or Flex cluster in Atlas. When you create the AtlasDeployment custom resource, Atlas Kubernetes Operator tries to create or update a cluster or Flex cluster in Atlas.

Atlas Kubernetes Operator does one of the following actions depending on the values you specify in the AtlasDeployment custom resource:

Note

Don't specify values for fields under spec.serverlessSpec because Serverless instances are deprecated. Instead, specify fields under spec.flexSpec. To learn more, see Migration to Flex Clusters.

Creating a free tier Atlas cluster takes less than 15 seconds.

Creating or updating a Flex cluster or Dedicated cluster can take up to 10 minutes. Atlas Kubernetes Operator monitors the update process.

You can run the following command to check on the status:

kubectl get atlasdeployment -o yaml

The following example shows the status section of a cluster that is provisioning:

status:
conditions:
- lastTransitionTime: "2024-03-18T16:32:43Z"
status: "False"
type: ClusterReady
reason: ClusterCreating
message: Cluster is provisioning

The ClusterReady status will change to True when the cluster or Serverless instance is ready.

The following example shows the AtlasDeployment resource with a ClusterReady status of True:

apiVersion: atlas.mongodb.com/v1
kind: AtlasDeployment
metadata:
name: my-atlas-cluster
namespace: mongodb-atlas-system
spec:
projectRef:
name: my-project
deploymentSpec:
name: test-cluster
tags:
- key: "environment"
value: "production"
replicationSpecs:
- zoneName: US-Zone
numShards: 3
regionConfigs:
- regionName: CENTRAL_US
providerName: GCP
backingProviderName: GCP
priority: 7
electableSpecs:
instanceSize: M10
nodeCount: 3
status:
conditions:
- lastTransitionTime: "2024-03-18T16:32:43Z"
status: "True"
type: Ready
- lastTransitionTime: "2024-03-18T16:32:43Z"
status: "True"
type: ClusterReady
connectionStrings:
standard: mongodb://test-cluster-shard-00-00.kpc8f.mongodb.net:27017,test-cluster-shard-00-01.kpc8f.mongodb.net:27017,test-cluster-shard-00-02.kpc8f.mongodb.net:27017/?ssl=true&authSource=admin&replicaSet=atlas-1gm1pv-shard-0
standardSrv: mongodb+srv://test-cluster.kpc8f.mongodb.net
mongoDBVersion: 6.0
mongoURIUpdated: "2024-03-12T12:21:41Z"
observedGeneration: 1
stateName: IDLE

The following example shows an AtlasDeployment custom resource specification configured for auto-scaling multi-region clusters:

apiVersion: atlas.mongodb.com/v1
kind: AtlasDeployment
metadata:
name: test-cluster-name
namespace: mongodb-atlas-system
spec:
projectRef:
name: development
deploymentSpec:
clusterType: REPLICASET
name: service-name
tags:
- key: "environment"
value: "production"
backupEnabled: true
replicationSpecs:
- numShards: 1
regionConfigs:
- regionName: EASTERN_US
providerName: GCP
autoScaling:
diskGB:
enabled: true
compute:
enabled: true
scaleDownEnabled: true
minInstanceSize: M30
maxInstanceSize: M40
analyticsSpecs:
instanceSize: M30
nodeCount: 1
electableSpecs:
instanceSize: M30
nodeCount: 3
priority: 7
readOnlySpecs:
instanceSize: M30
nodeCount: 1

The following example shows an AtlasDeployment custom resource specification configured with some of the additional options.

apiVersion: atlas.mongodb.com/v1
kind: AtlasDeployment
metadata:
name: my-atlas-cluster
spec:
projectRef:
name: my-project
deploymentSpec:
name: test-cluster
tags:
- key: "environment"
value: "production"
replicationSpecs:
- zoneName: Zone 1
regionConfigs:
- electableSpecs:
instanceSize: M10
nodeCount: 3
providerName: AWS
regionName: US_EAST_1
priority: 7
processArgs:
javascriptEnabled: false
  • Until January 2026, to preserve backwards compatibility for a period of time, Atlas allows you to manage migrated clusters through both the Serverless instances and Flex clusters APIs, including when you're using Atlas Kubernetes Operator.

  • You can create and manage Flex clusters in the same AtlasDeployment in which you created and managed Serverless instances and M2 and M5 clusters.

  • You can't create NEW M2/M5 clusters and Serverless instances in Atlas. Attempting to do so creates a Flex cluster instead.

  • You can still use existing Serverless instances in Atlas Kubernetes Operator even though existing Serverless instances are deprecated as of early February 2025.

  • For your existing Serverless instances, you can choose to replace references to spec.serverlessSpec in the AtlasDeployment with the configuration for spec.flexSpec. Or, you can continue using the same spec. Managing a deployment via the spec.serverlessSpec in the AtlasDeployment Custom Resource will continue to work even once Atlas automatically migrates these existing clusters to Flex clusters in March 2025.

  • For your existing M2 and M5 clusters, you can choose to replace references to spec.deploymentSpec in the AtlasDeployment Custom Resource with the configuration for spec.flexSpec. Or, you can continue using the same spec. Managing a deployment via the spec.deploymentSpec in the AtlasDeployment Custom Resource will continue to work even once Atlas automatically migrates these existing M2 and M5 clusters to Flex clusters in May 2025.

  • For your existing Serverless instances, if you receive errors during reconciliations related to private endpoints, you must upgrade to Atlas Kubernetes Operator 2.7.1, or replace the serverlessSpec configuration with the configuration for flexSpec in the AtlasDeployment custom resource.

  • For your M2 and M5 clusters, to avoid reconciliation errors that you might notice after the automigration, make the following changes to your CRD configurations:

    Alternatively, replace references to spec.deploymentSpec in the AtlasDeployment with the configuration for spec.flexSpec.

  • By January 2026, you must remove all remaining M2/M5 and Serverless Instance configurations from your Atlas Kubernetes Operator custom resources because backwards compatibility of APIs ends January 2026, when the old APIs will be removed and only APIs related to Flex clusters will remain in place.

  • Newer releases of Atlas Kubernetes Operator will cease supporting existing M2/M5 clusters and Serverless instances. Older versions of Atlas Kubernetes Operator will continue to support these instance types until January 2026.

To learn more, see Migration to Flex Clusters in this guide and the Flex Migration Guide in the Atlas documentation.

The following example shows an AtlasDeployment custom resource specification configured for a Flex cluster:

apiVersion: atlas.mongodb.com/v1
kind: AtlasDeployment
metadata:
name: test-cluster-name
namespace: mongodb-atlas-system
spec:
projectRef:
name: my-project
flexSpec:
name: flex-cluster
tags:
- key: "environment"
value: "production"
providerSettings:
backingProviderName: AWS
regionName: US_EAST_1

Note

Don't specify values for fields under spec.serverlessSpec because Serverless instances are deprecated. Instead, specify fields under spec.flexSpec. To learn more, see Migration to Flex Clusters.

The following example shows an AtlasDeployment custom resource specification configured for a Serverless instance:

apiVersion: atlas.mongodb.com/v1
kind: AtlasDeployment
metadata:
name: test-cluster-name
namespace: mongodb-atlas-system
spec:
projectRef:
name: development
serverlessSpec:
name: serverless-instance
tags:
- key: "environment"
value: "production"
providerSettings:
providerName: AWS
regionName: US_EAST_1

Clusters can span regions and cloud service providers. To learn more, see Considerations.

Note

While the Atlas Cluster API Resource sends requests using the v1.5 Atlas API versions, the Atlas Kubernetes Operator apiVersion field uses v1. In this case, v1 refers to the version of the Kubernetes API.

The following example shows an AtlasDeployment custom resource specification configured for multi-region clusters:

apiVersion: atlas.mongodb.com/v1
kind: AtlasDeployment
metadata:
name: my-atlas-cluster
spec:
projectRef:
name: my-project
deploymentSpec:
clusterType: REPLICASET
name: tenantCluster
tags:
- key: "environment"
value: "production"
replicationSpecs:
- zoneName: Zone 1
regionConfigs:
priority: 7
- electableSpecs:
instanceSize: M10
nodeCount: 3
providerName: AWS
regionName: US_EAST_1

The following example shows an AtlasDeployment custom resource specification configured to span multiple cloud service providers:

apiVersion: atlas.mongodb.com/v1
kind: AtlasDeployment
metadata:
name: my-atlas-cluster
spec:
projectRef:
name: my-project
deploymentSpec:
clusterType: REPLICASET
name: tenantCluster
tags:
- key: "environment"
value: "production"
replicationSpecs:
- regionConfigs:
- electableSpecs:
instanceSize: M10
nodeCount: 3
providerName: AWS
regionName: US_EAST_1
priority: 7
- electableSpecs:
instanceSize: M10
nodeCount: 2
providerName: AZURE
regionName: US_EAST_2
priority: 6
- electableSpecs:
instanceSize: M10
nodeCount: 2
providerName: GCP
regionName: CENTRAL_US
priority: 5

The following example shows an AtlasDeployment custom resource specification configured to create a search index for the collection listingsAndReviews and grades:

apiVersion: atlas.mongodb.com/v1
kind: AtlasDeployment
metadata:
name: my-atlas-cluster
namespace: mongodb-atlas-system
spec:
deploymentSpec:
backupEnabled: true
clusterType: REPLICASET
name: Test-cluster-M10
replicationSpecs:
- regionConfigs:
- backingProviderName: AWS
electableSpecs:
instanceSize: M10
nodeCount: 3
priority: 7
providerName: AWS
regionName: US_EAST_1
zoneName: Zone 1
searchIndexes:
- DBName: sample_training
collectionName: grades
name: test-vector-search-index
type: vectorSearch
vectorSearch:
fields:
- numDimensions: 1000
path: student_id
similarity: euclidean
type: vector
- DBName: sample_airbnb
collectionName: listingsAndReviews
name: my-index
search:
mappings:
dynamic: true
searchConfigurationRef:
name: atlassearchindexconfig-sample
namespace: mongodb-atlas-system
type: search
terminationProtectionEnabled: false
projectRef:
name: my-project
namespace: mongodb-atlas-system

The following example shows an AtlasDeployment custom resource specification configured to create search nodes:

apiVersion: atlas.mongodb.com/v1
kind: AtlasDeployment
metadata:
name: my-atlas-cluster
namespace: mongodb-atlas-system
spec:
deploymentSpec:
backupEnabled: true
clusterType: REPLICASET
name: Test-cluster-M10
replicationSpecs:
- regionConfigs:
- backingProviderName: AWS
electableSpecs:
instanceSize: M10
nodeCount: 3
priority: 7
providerName: AWS
regionName: US_EAST_1
zoneName: Zone 1
searchNodes:
- instanceSize: S20_HIGHCPU_NVME
nodeCount: 2

AtlasDeployment is the Schema for the atlasdeployments API

Name
Type
Description
Required

apiVersion

string

atlas.mongodb.com/v1

true

kind

string

AtlasDeployment

true

metadata

object

Refer to the Kubernetes API documentation for the fields of the metadata field.

true

spec

object

AtlasDeploymentSpec defines the target state of AtlasDeployment. Only one of DeploymentSpec, AdvancedDeploymentSpec and ServerlessSpec should be defined. Validations:

  • (has(self.``externalProjectRef``) && !has(self.``projectRef``)) || (!has(self.``externalProjectRef``) && has(self.``projectRef``)): must define only one project reference through externalProjectRef or projectRef

  • (has(self.``externalProjectRef``) && has(self.``connectionSecret``)) || !has(self.``externalProjectRef``): must define a local connection secret when referencing an external project

  • !has(self.``serverlessSpec``) || (oldSelf.``hasValue``() && oldSelf.value().``serverlessSpec`` != null): serverlessSpec cannot be added - serverless instances are deprecated

false

status

object

AtlasDeploymentStatus defines the observed state of AtlasDeployment.

false

AtlasDeploymentSpec defines the target state of AtlasDeployment. Only one of DeploymentSpec, AdvancedDeploymentSpec and ServerlessSpec should be defined.

Name
Type
Description
Required

backupRef

object

Reference to the backup schedule for the AtlasDeployment.

false

connectionSecret

object

Name of the secret containing Atlas API private and public keys.

false

deploymentSpec

object

Configuration for the advanced (v1.5) deployment API https://www.mongodb.com/docs/atlas/reference/api/clusters/

false

externalProjectRef

object

externalProjectRef holds the parent Atlas project ID. Mutually exclusive with the "projectRef" field.

false

flexSpec

object

false

processArgs

object

ProcessArgs allows modification of Advanced Configuration Options.

false

projectRef

object

projectRef is a reference to the parent AtlasProject resource. Mutually exclusive with the "externalProjectRef" field.

false

serverlessSpec

object

false

upgradeToDedicated

boolean

upgradeToDedicated, when set to true, triggers the migration from a Flex to a Dedicated cluster. The user MUST provide the new dedicated cluster configuration. This flag is ignored if the cluster is already dedicated.

false

Reference to the backup schedule for the AtlasDeployment.

Name
Type
Description
Required

name

string

Name of the Kubernetes Resource

true

namespace

string

Namespace of the Kubernetes Resource

false

Name of the secret containing Atlas API private and public keys.

Name
Type
Description
Required

name

string

true

Configuration for the advanced (v1.5) deployment API https://www.mongodb.com/docs/atlas/reference/api/clusters/

Name
Type
Description
Required

name

string

Name of the advanced deployment as it appears in Atlas. After Atlas creates the deployment, you can't change its name. Can only contain ASCII letters, numbers, and hyphens. Validations:

  • self == oldSelf: Name cannot be modified after deployment creation

true

backupEnabled

boolean

Flag that indicates if the deployment uses Cloud Backups for backups. Applicable only for M10``+ deployments.

false

biConnector

object

Configuration of BI Connector for Atlas on this deployment. The MongoDB Connector for Business Intelligence for Atlas (BI Connector) is only available for M10 and larger deployments.

false

clusterType

enum

Type of the deployment that you want to create. The parameter is required if replicationSpecs are set or if Global Deployments are deployed. Enum: REPLICASET, SHARDED, GEOSHARDED

false

configServerManagementMode

enum

Config Server Management Mode for creating or updating a sharded cluster. Enum: ATLAS_MANAGED, FIXED_TO_DEDICATED

false

customZoneMapping

[]object

List that contains Global Cluster parameters that map zones to geographic regions.

false

diskSizeGB

integer

Capacity, in gigabytes, of the host's root volume. Increase this number to add capacity, up to a maximum possible value of 4096 (i.e., 4 TB). This value must be a positive integer. The parameter is required if replicationSpecs are configured. Minimum: 0 Maximum: 4096

false

encryptionAtRestProvider

enum

Cloud service provider that offers Encryption at Rest. Enum: AWS, GCP, AZURE, NONE

false

labels

[]object

Collection of key-value pairs that tag and categorize the deployment. Each key and value has a maximum length of 255 characters. DEPRECATED: Cluster labels are deprecated and will be removed in a future release. We strongly recommend that you use Resource Tags instead.

false

managedNamespaces

[]object

List that contains information to create a managed namespace in a specified Global Cluster to create.

false

mongoDBMajorVersion

string

MongoDB major version of the cluster. Set to the binary major version.

false

mongoDBVersion

string

Version of MongoDB that the cluster runs.

false

paused

boolean

Flag that indicates whether the deployment should be paused.

false

pitEnabled

boolean

Flag that indicates the deployment uses continuous cloud backups.

false

replicationSpecs

[]object

Configuration for deployment regions.

false

rootCertType

string

Root Certificate Authority that MongoDB Atlas cluster uses.

false

searchIndexes

[]object

An array of SearchIndex objects with fields that describe the search index.

false

searchNodes

[]object

Settings for Search Nodes for the cluster. Currently, at most one search node configuration may be defined.

false

tags

[]object

Key-value pairs for resource tagging.

false

terminationProtectionEnabled

boolean

Flag that indicates whether termination protection is enabled on the cluster. If set to true, MongoDB Cloud won't delete the cluster. If set to false, MongoDB Cloud will delete the cluster. Default: false

false

versionReleaseSystem

string

Method by which the cluster maintains the MongoDB versions. If value is CONTINUOUS, you must not specify mongoDBMajorVersion.

false

Configuration of BI Connector for Atlas on this deployment. The MongoDB Connector for Business Intelligence for Atlas (BI Connector) is only available for M10 and larger deployments.

Name
Type
Description
Required

enabled

boolean

Flag that indicates whether the Business Intelligence Connector for Atlas is enabled on the deployment.

false

readPreference

string

Source from which the BI Connector for Atlas reads data. Each BI Connector for Atlas read preference contains a distinct combination of readPreference and readPreferenceTags options.

false

Name
Type
Description
Required

location

string

Code that represents a location that maps to a zone in your global cluster. MongoDB Atlas represents this location with a ISO 3166-2 location and subdivision codes when possible.

true

zone

string

Human-readable label that identifies the zone in your global cluster. This zone maps to a location code.

true

LabelSpec contains key-value pairs that tag and categorize the Cluster/DBUser

Name
Type
Description
Required

key

string

Key applied to tag and categorize this component.

true

value

string

Value set to the Key applied to tag and categorize this component.

true

ManagedNamespace represents the information about managed namespace configuration.

Name
Type
Description
Required

collection

string

Human-readable label of the collection to manage for this Global Cluster.

true

db

string

Human-readable label of the database to manage for this Global Cluster.

true

customShardKey

string

Database parameter used to divide the collection into shards. Global clusters require a compound shard key. This compound shard key combines the location parameter and the user-selected custom key.

false

isCustomShardKeyHashed

boolean

Flag that indicates whether someone hashed the custom shard key for the specified collection. If you set this value to false, MongoDB Cloud uses ranged sharding.

false

isShardKeyUnique

boolean

Flag that indicates whether someone hashed the custom shard key. If this parameter returns false, this cluster uses ranged sharding.

false

numInitialChunks

integer

Minimum number of chunks to create initially when sharding an empty collection with a hashed shard key. Maximum value is 8192.

false

presplitHashedZones

boolean

Flag that indicates whether MongoDB Cloud should create and distribute initial chunks for an empty or non-existing collection. MongoDB Cloud distributes data based on the defined zones and zone ranges for the collection.

false

Name
Type
Description
Required

numShards

integer

Positive integer that specifies the number of shards to deploy in each specified zone. If you set this value to 1 and clusterType is SHARDED, MongoDB Cloud deploys a single-shard sharded cluster. Don't create a sharded cluster with a single shard for production environments. Single-shard sharded clusters don't provide the same benefits as multi-shard configurations

false

regionConfigs

[]object

Hardware specifications for nodes set for a given region. Each regionConfigs object describes the region's priority in elections and the number and type of MongoDB nodes that MongoDB Cloud deploys to the region. Each regionConfigs object must have either an analyticsSpecs object, electableSpecs object, or readOnlySpecs object. Tenant clusters only require electableSpecs. Dedicated clusters can specify any of these specifications, but must have at least one electableSpecs object within a replicationSpec. Every hardware specification must use the same instanceSize.

false

zoneName

string

Human-readable label that identifies the zone in a Global Cluster.

false

Name
Type
Description
Required

analyticsSpecs

object

Hardware specifications for analytics nodes deployed in the region.

false

autoScaling

object

Options that determine how this cluster handles resource scaling.

false

backingProviderName

enum

Cloud service provider on which the host for a multi-tenant deployment is provisioned. This setting only works when "providerName" : "TENANT" and "providerSetting.``instanceSizeName``" : M2 or M5. Otherwise, it should be equal to the "providerName" value. Enum: AWS, GCP, AZURE

false

electableSpecs

object

Hardware specifications for nodes deployed in the region.

false

priority

integer

Precedence is given to this region when a primary election occurs. If your regionConfigs has only readOnlySpecs, analyticsSpecs, or both, set this value to 0. If you have multiple regionConfigs objects (your cluster is multi-region or multi-cloud), they must have priorities in descending order. The highest priority is 7

false

providerName

enum

Enum: AWS, GCP, AZURE, TENANT, SERVERLESS

false

readOnlySpecs

object

Hardware specifications for read only nodes deployed in the region.

false

regionName

string

Physical location of your MongoDB deployment. The region you choose can affect network latency for clients accessing your databases.

false

Hardware specifications for analytics nodes deployed in the region.

Name
Type
Description
Required

diskIOPS

integer

Disk IOPS setting for AWS storage. Set only if you selected AWS as your cloud service provider. Format: int64

false

ebsVolumeType

enum

Disk IOPS setting for AWS storage. Set only if you selected AWS as your cloud service provider. Enum: STANDARD, PROVISIONED

false

instanceSize

string

Hardware specification for the instance sizes in this region. Each instance size has a default storage and memory capacity. The instance size you select applies to all the data-bearing hosts in your instance size.

false

nodeCount

integer

Number of nodes of the given type for MongoDB Cloud to deploy to the region.

false

Options that determine how this cluster handles resource scaling.

Name
Type
Description
Required

compute

object

Collection of settings that configure how a deployment might scale its deployment tier and whether the deployment can scale down.

false

diskGB

object

Flag that indicates whether disk auto-scaling is enabled. The default is true.

false

Collection of settings that configure how a deployment might scale its deployment tier and whether the deployment can scale down.

Name
Type
Description
Required

enabled

boolean

Flag that indicates whether deployment tier auto-scaling is enabled. The default is false.

false

maxInstanceSize

string

Maximum instance size to which your deployment can automatically scale (such as M40). Atlas requires this parameter if "autoScaling.compute.enabled" : true.

false

minInstanceSize

string

Minimum instance size to which your deployment can automatically scale (such as M10). Atlas requires this parameter if "autoScaling.compute.``scaleDownEnabled``" : true.

false

scaleDownEnabled

boolean

Flag that indicates whether the deployment tier may scale down. Atlas requires this parameter if "autoScaling.compute.enabled" : true.

false

Flag that indicates whether disk auto-scaling is enabled. The default is true.

Name
Type
Description
Required

enabled

boolean

Flag that indicates whether this cluster enables disk auto-scaling. The maximum memory allowed for the selected cluster tier and the oplog size can limit storage auto-scaling.

false

Hardware specifications for nodes deployed in the region.

Name
Type
Description
Required

diskIOPS

integer

Disk IOPS setting for AWS storage. Set only if you selected AWS as your cloud service provider. Format: int64

false

ebsVolumeType

enum

Disk IOPS setting for AWS storage. Set only if you selected AWS as your cloud service provider. Enum: STANDARD, PROVISIONED

false

instanceSize

string

Hardware specification for the instance sizes in this region. Each instance size has a default storage and memory capacity. The instance size you select applies to all the data-bearing hosts in your instance size.

false

nodeCount

integer

Number of nodes of the given type for MongoDB Cloud to deploy to the region.

false

Hardware specifications for read only nodes deployed in the region.

Name
Type
Description
Required

diskIOPS

integer

Disk IOPS setting for AWS storage. Set only if you selected AWS as your cloud service provider. Format: int64

false

ebsVolumeType

enum

Disk IOPS setting for AWS storage. Set only if you selected AWS as your cloud service provider. Enum: STANDARD, PROVISIONED

false

instanceSize

string

Hardware specification for the instance sizes in this region. Each instance size has a default storage and memory capacity. The instance size you select applies to all the data-bearing hosts in your instance size.

false

nodeCount

integer

Number of nodes of the given type for MongoDB Cloud to deploy to the region.

false

SearchIndex is the CRD to configure part of the Atlas Search Index.

Name
Type
Description
Required

DBName

string

Human-readable label that identifies the database that contains the collection with one or more Atlas Search indexes.

true

collectionName

string

Human-readable label that identifies the collection that contains one or more Atlas Search indexes.

true

name

string

Human-readable label that identifies this index. Must be unique for a deployment.

true

type

enum

Type of the index. Enum: search, vectorSearch

true

search

object

Atlas search index configuration.

false

vectorSearch

object

Atlas vector search index configuration.

false

Atlas search index configuration.

Name
Type
Description
Required

mappings

object

Index specifications for the collection's fields.

true

searchConfigurationRef

object

A reference to the AtlasSearchIndexConfig custom resource.

true

synonyms

[]object

Rule sets that map words to their synonyms in this index.

false

Index specifications for the collection's fields.

Name
Type
Description
Required

dynamic

JSON

Indicates whether the index uses static, default dynamic, or configurable dynamic mappings. Set to true to enable dynamic mapping with default type set or define object to specify the name of the configured type sets for dynamic mapping. If you specify configurable dynamic mappings, you must define the referred type sets in the ``typeSets`` field. Set to false to use only static mappings through mappings.fields.

false

fields

JSON

One or more field specifications for the Atlas Search index. Required if mapping.dynamic is omitted or set to false.

false

A reference to the AtlasSearchIndexConfig custom resource.

Name
Type
Description
Required

name

string

Name of the Kubernetes Resource

true

namespace

string

Namespace of the Kubernetes Resource

false

Synonym represents "Synonym" type of Atlas Search Index.

Name
Type
Description
Required

analyzer

enum

Specific pre-defined method chosen to apply to the synonyms to be searched. Enum: lucene.standard, lucene.simple, lucene.whitespace, lucene.keyword, lucene.arabic, lucene.armenian, lucene.basque, lucene.bengali, lucene.brazilian, lucene.bulgarian, lucene.catalan, lucene.chinese, lucene.cjk, lucene.czech, lucene.danish, lucene.dutch, lucene.english, lucene.finnish, lucene.french, lucene.galician, lucene.german, lucene.greek, lucene.hindi, lucene.hungarian, lucene.indonesian, lucene.irish, lucene.italian, lucene.japanese, lucene.korean, lucene.kuromoji, lucene.latvian, lucene.lithuanian, lucene.morfologik, lucene.nori, lucene.norwegian, lucene.persian, lucene.portuguese, lucene.romanian, lucene.russian, lucene.smartcn, lucene.sorani, lucene.spanish, lucene.swedish, lucene.thai, lucene.turkish, lucene.ukrainian

true

name

string

Human-readable label that identifies the synonym definition. Each name must be unique within the same index definition.

true

source

object

Data set that stores the mapping one or more words map to one or more synonyms of those words.

true

Data set that stores the mapping one or more words map to one or more synonyms of those words.

Name
Type
Description
Required

collection

string

Human-readable label that identifies the MongoDB collection that stores words and their applicable synonyms.

true

Atlas vector search index configuration.

Name
Type
Description
Required

fields

JSON

Array of JSON objects. See examples https://dochub.mongodb.org/core/avs-vector-type

true

Name
Type
Description
Required

instanceSize

enum

Hardware specification for the Search Node instance sizes. Enum: S20_HIGHCPU_NVME, S30_HIGHCPU_NVME, S40_HIGHCPU_NVME, S50_HIGHCPU_NVME, S60_HIGHCPU_NVME, S70_HIGHCPU_NVME, S80_HIGHCPU_NVME, S30_LOWCPU_NVME, S40_LOWCPU_NVME, S50_LOWCPU_NVME, S60_LOWCPU_NVME, S80_LOWCPU_NVME, S90_LOWCPU_NVME, S100_LOWCPU_NVME, S110_LOWCPU_NVME

false

nodeCount

integer

Number of Search Nodes in the cluster. Minimum: 2 Maximum: 32

false

TagSpec holds a key-value pair for resource tagging on this deployment.

Name
Type
Description
Required

key

string

Constant that defines the set of the tag.

true

value

string

Variable that belongs to the set of the tag.

true

externalProjectRef holds the parent Atlas project ID. Mutually exclusive with the "projectRef" field.

Name
Type
Description
Required

id

string

ID is the Atlas project ID.

true

Configuration for the Flex cluster API. https://www.mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Flex-Clusters

Name
Type
Description
Required

name

string

Human-readable label that identifies the instance.

true

providerSettings

object

Group of cloud provider settings that configure the provisioned MongoDB flex cluster.

true

tags

[]object

List that contains key-value pairs between 1 and 255 characters in length for tagging and categorizing the instance.

false

terminationProtectionEnabled

boolean

Flag that indicates whether termination protection is enabled on the cluster. If set to true, MongoDB Cloud won't delete the cluster. If set to false, MongoDB Cloud will delete the cluster. Default: false

false

Group of cloud provider settings that configure the provisioned MongoDB flex cluster.

Name
Type
Description
Required

backingProviderName

enum

Cloud service provider on which MongoDB Atlas provisions the flex cluster. Validations:

  • self == oldSelf: Backing Provider cannot be modified after cluster creation

Enum: AWS, GCP, AZURE

true

regionName

string

Human-readable label that identifies the geographic location of your MongoDB flex cluster. The region you choose can affect network latency for clients accessing your databases. Validations:

  • self == oldSelf: Region Name cannot be modified after cluster creation

true

TagSpec holds a key-value pair for resource tagging on this deployment.

Name
Type
Description
Required

key

string

Constant that defines the set of the tag.

true

value

string

Variable that belongs to the set of the tag.

true

ProcessArgs allows modification of Advanced Configuration Options.

Name
Type
Description
Required

defaultReadConcern

string

String that indicates the default level of acknowledgment requested from MongoDB for read operations set for this cluster.

false

defaultWriteConcern

string

String that indicates the default level of acknowledgment requested from MongoDB for write operations set for this cluster.

false

failIndexKeyTooLong

boolean

Flag that indicates whether to fail the operation and return an error when you insert or update documents where all indexed entries exceed 1024 bytes. If you set this to false, mongod writes documents that exceed this limit, but doesn't index them.

false

javascriptEnabled

boolean

Flag that indicates whether the cluster allows execution of operations that perform server-side executions of JavaScript.

false

minimumEnabledTlsProtocol

string

String that indicates the minimum TLS version that the cluster accepts for incoming connections. Clusters using TLS 1.0 or 1.1 should consider setting TLS 1.2 as the minimum TLS protocol version.

false

noTableScan

boolean

Flag that indicates whether the cluster disables executing any query that requires a collection scan to return results.

false

oplogMinRetentionHours

string

Minimum retention window for cluster's oplog expressed in hours. A value of null indicates that the cluster uses the default minimum oplog window that MongoDB Cloud calculates.

false

oplogSizeMB

integer

Number that indicates the storage limit of a cluster's oplog expressed in megabytes. A value of null indicates that the cluster uses the default oplog size that Atlas calculates. Format: int64

false

sampleRefreshIntervalBIConnector

integer

Number that indicates the documents per database to sample when gathering schema information. Format: int64

false

sampleSizeBIConnector

integer

Number that indicates the interval in seconds at which the mongosqld process re-samples data to create its relational schema. Format: int64

false

projectRef is a reference to the parent AtlasProject resource. Mutually exclusive with the "externalProjectRef" field.

Name
Type
Description
Required

name

string

Name of the Kubernetes Resource

true

namespace

string

Namespace of the Kubernetes Resource

false

Configuration for the serverless deployment API. https://www.mongodb.com/docs/atlas/reference/api/serverless-instances/ DEPRECATED: Serverless instances are deprecated. See https://dochub.mongodb.org/core/atlas-flex-migration for details.

Name
Type
Description
Required

name

string

Name of the serverless deployment as it appears in Atlas. After Atlas creates the deployment, you can't change its name. Can only contain ASCII letters, numbers, and hyphens.

true

providerSettings

object

Configuration for the provisioned hosts on which MongoDB runs. The available options are specific to the cloud service provider.

true

backupOptions

object

Serverless Backup Options

false

privateEndpoints

[]object

List that contains the private endpoint configurations for the Serverless instance. DEPRECATED: Serverless private endpoints are deprecated. See https://dochub.mongodb.org/core/atlas-flex-migration for details.

false

tags

[]object

Key-value pairs for resource tagging.

false

terminationProtectionEnabled

boolean

Flag that indicates whether termination protection is enabled on the cluster. If set to true, MongoDB Cloud won't delete the cluster. If set to false, MongoDB Cloud will delete the cluster. Default: false

false

Configuration for the provisioned hosts on which MongoDB runs. The available options are specific to the cloud service provider.

Name
Type
Description
Required

providerName

enum

Cloud service provider on which Atlas provisions the hosts. Enum: AWS, GCP, AZURE, TENANT, SERVERLESS

true

autoScaling

object

Range of instance sizes to which your deployment can scale. DEPRECATED: The value of this field doesn't take any effect.

false

backingProviderName

enum

Cloud service provider on which the host for a multi-tenant deployment is provisioned. This setting only works when "providerSetting.``providerName``" : "TENANT" and "providerSetting.``instanceSizeName``" : M2 or M5. Enum: AWS, GCP, AZURE

false

diskIOPS

integer

Disk IOPS setting for AWS storage. Set only if you selected AWS as your cloud service provider. DEPRECATED: The value of this field doesn't take any effect. Format: int64

false

diskTypeName

string

Type of disk if you selected Azure as your cloud service provider. DEPRECATED: The value of this field doesn't take any effect.

false

encryptEBSVolume

boolean

Flag that indicates whether the Amazon EBS encryption feature encrypts the host's root volume for both data at rest within the volume and for data moving between the volume and the deployment. DEPRECATED: The value of this field doesn't take any effect.

false

instanceSizeName

string

Atlas provides different deployment tiers, each with a default storage capacity and RAM size. The deployment you select is used for all the data-bearing hosts in your deployment tier. DEPRECATED: The value of this field doesn't take any effect.

false

regionName

string

Physical location of your MongoDB deployment. The region you choose can affect network latency for clients accessing your databases.

false

volumeType

enum

Disk IOPS setting for AWS storage. Set only if you selected AWS as your cloud service provider. DEPRECATED: The value of this field doesn't take any effect. Enum: STANDARD, PROVISIONED

false

Range of instance sizes to which your deployment can scale. DEPRECATED: The value of this field doesn't take any effect.

Name
Type
Description
Required

autoIndexingEnabled

boolean

Flag that indicates whether autopilot mode for Performance Advisor is enabled. The default is false. DEPRECATED: This flag is no longer supported.

false

compute

object

Collection of settings that configure how a deployment might scale its deployment tier and whether the deployment can scale down.

false

diskGBEnabled

boolean

Flag that indicates whether disk auto-scaling is enabled. The default is true.

false

Collection of settings that configure how a deployment might scale its deployment tier and whether the deployment can scale down.

Name
Type
Description
Required

enabled

boolean

Flag that indicates whether deployment tier auto-scaling is enabled. The default is false.

false

maxInstanceSize

string

Maximum instance size to which your deployment can automatically scale (such as M40). Atlas requires this parameter if "autoScaling.compute.enabled" : true.

false

minInstanceSize

string

Minimum instance size to which your deployment can automatically scale (such as M10). Atlas requires this parameter if "autoScaling.compute.``scaleDownEnabled``" : true.

false

scaleDownEnabled

boolean

Flag that indicates whether the deployment tier may scale down. Atlas requires this parameter if "autoScaling.compute.enabled" : true.

false

Serverless Backup Options

Name
Type
Description
Required

serverlessContinuousBackupEnabled

boolean

ServerlessContinuousBackupEnabled indicates whether the cluster uses continuous cloud backups. DEPRECATED: Serverless instances are deprecated, and no longer support continuous backup. See https://dochub.mongodb.org/core/atlas-flex-migration for details. Default: true

false

ServerlessPrivateEndpoint configures private endpoints for the Serverless instances. DEPRECATED: Serverless private endpoints are deprecated. See https://dochub.mongodb.org/core/atlas-flex-migration for details.

Name
Type
Description
Required

cloudProviderEndpointID

string

CloudProviderEndpointID is the identifier of the cloud provider endpoint.

false

name

string

Name is the name of the Serverless PrivateLink Service. Should be unique.

false

privateEndpointIpAddress

string

PrivateEndpointIPAddress is the IPv4 address of the private endpoint in your Azure VNet that someone added to this private endpoint service.

false

TagSpec holds a key-value pair for resource tagging on this deployment.

Name
Type
Description
Required

key

string

Constant that defines the set of the tag.

true

value

string

Variable that belongs to the set of the tag.

true

AtlasDeploymentStatus defines the observed state of AtlasDeployment.

Name
Type
Description
Required

conditions

[]object

Conditions is the list of statuses showing the current state of the Atlas Custom Resource

true

connectionStrings

object

ConnectionStrings is a set of connection strings that your applications use to connect to this cluster.

false

customZoneMapping

object

List that contains key value pairs to map zones to geographic regions. These pairs map an ISO 3166-1a2 location code, with an ISO 3166-2 subdivision code when possible, to a unique 24-hexadecimal string that identifies the custom zone.

false

managedNamespaces

[]object

List that contains a namespace for a Global Cluster. MongoDB Atlas manages this cluster.

false

mongoDBVersion

string

MongoDBVersion is the version of MongoDB the cluster runs, in . format.

false

mongoURIUpdated

string

MongoURIUpdated is a timestamp in ISO 8601 date and time format in UTC when the connection string was last updated. The connection string changes if you update any of the other values.

false

observedGeneration

integer

ObservedGeneration indicates the generation of the resource specification of which the Atlas Operator is aware. The Atlas Operator updates this field to the value of 'metadata.generation' as soon as it starts reconciliation of the resource. Format: int64

false

replicaSets

[]object

Details that explain how MongoDB Cloud replicates data on the specified MongoDB database. This array has one object per shard representing node configurations in each shard. For replica sets there is only one object representing node configurations.

false

searchIndexes

[]object

SearchIndexes contains a list of search indexes statuses configured for a project.

false

serverlessPrivateEndpoints

[]object

ServerlessPrivateEndpoints contains a list of private endpoints configured for the serverless deployment.

false

stateName

string

StateName is the current state of the cluster. The possible states are: IDLE, CREATING, UPDATING, DELETING, DELETED, REPAIRING

false

Condition describes the state of an Atlas Custom Resource at a certain point.

Name
Type
Description
Required

status

string

Status of the condition; one of True, False, Unknown.

true

type

string

Type of Atlas Custom Resource condition.

true

lastTransitionTime

string

Last time the condition transitioned from one status to another. Represented in ISO 8601 format. Format: date-time

false

message

string

A message providing details about the transition.

false

reason

string

The reason for the condition's last transition.

false

ConnectionStrings is a set of connection strings that your applications use to connect to this cluster.

Name
Type
Description
Required

private

string

Network-peering-endpoint-aware mongodb:// connection strings for each interface VPC endpoint you configured to connect to this cluster. Atlas returns this parameter only if you created a network peering connection to this cluster.

false

privateEndpoint

[]object

Private endpoint connection strings. Each object describes the connection strings you can use to connect to this cluster through a private endpoint. Atlas returns this parameter only if you deployed a private endpoint to all regions to which you deployed this cluster's nodes.

false

privateSrv

string

Network-peering-endpoint-aware mongodb+srv:// connection strings for each interface VPC endpoint you configured to connect to this cluster. Atlas returns this parameter only if you created a network peering connection to this cluster. Use this URI format if your driver supports it. If it doesn't, use connectionStrings.private.

false

standard

string

Public mongodb:// connection string for this cluster.

false

standardSrv

string

Public mongodb+srv:// connection string for this cluster.

false

PrivateEndpoint connection strings. Each object describes the connection strings you can use to connect to this cluster through a private endpoint. Atlas returns this parameter only if you deployed a private endpoint to all regions to which you deployed this cluster's nodes.

Name
Type
Description
Required

connectionString

string

Private-endpoint-aware mongodb:// connection string for this private endpoint.

false

endpoints

[]object

Private endpoint through which you connect to Atlas when you use connectionStrings.``privateEndpoint``[n].``connectionString`` or connectionStrings.``privateEndpoint``[n].``srvConnectionString``.

false

srvConnectionString

string

Private-endpoint-aware mongodb+srv:// connection string for this private endpoint.

false

srvShardOptimizedConnectionString

string

Private endpoint-aware connection string optimized for sharded clusters that uses the mongodb+srv:// protocol to connect to MongoDB Cloud through a private endpoint.

false

type

string

Type of MongoDB process that you connect to with the connection strings Atlas returns: • MONGOD for replica sets, or • MONGOS for sharded clusters

false

Endpoint through which you connect to Atlas

Name
Type
Description
Required

endpointId

string

Unique identifier of the private endpoint.

false

ip

string

Private IP address of the private endpoint network interface you created in your Azure VNet.

false

providerName

string

Cloud provider to which you deployed the private endpoint. Atlas returns AWS or AZURE.

false

region

string

Region to which you deployed the private endpoint.

false

List that contains key value pairs to map zones to geographic regions. These pairs map an ISO 3166-1a2 location code, with an ISO 3166-2 subdivision code when possible, to a unique 24-hexadecimal string that identifies the custom zone.

Name
Type
Description
Required

customZoneMapping

map[string]string

List that contains key value pairs to map zones to geographic regions. These pairs map an ISO 3166-1a2 location code, with an ISO 3166-2 subdivision code when possible, to a unique 24-hexadecimal string that identifies the custom zone.

false

zoneMappingErrMessage

string

Error message for failed Custom Zone Mapping.

false

zoneMappingState

string

Status of the Custom Zone Mapping.

false

Name
Type
Description
Required

collection

string

Human-readable label of the collection to manage for this Global Cluster.

true

db

string

Human-readable label of the database to manage for this Global Cluster.

true

customShardKey

string

Database parameter used to divide the collection into shards. Global clusters require a compound shard key. This compound shard key combines the location parameter and the user-selected custom key.

false

errMessage

string

Error message for a failed Managed Namespace.

false

isCustomShardKeyHashed

boolean

Flag that indicates whether someone hashed the custom shard key for the specified collection. If you set this value to false, MongoDB Atlas uses ranged sharding.

false

isShardKeyUnique

boolean

Flag that indicates whether someone hashed the custom shard key. If this parameter returns false, this cluster uses ranged sharding.

false

numInitialChunks

integer

Minimum number of chunks to create initially when sharding an empty collection with a hashed shard key.

false

presplitHashedZones

boolean

Flag that indicates whether MongoDB Cloud should create and distribute initial chunks for an empty or non-existing collection. MongoDB Atlas distributes data based on the defined zones and zone ranges for the collection.

false

status

string

Status of the Managed Namespace.

false

Name
Type
Description
Required

id

string

Unique 24-hexadecimal digit string that identifies the replication object for a shard in a Cluster.

true

zoneName

string

Human-readable label that describes the zone this shard belongs to in a Global Cluster.

false

Name
Type
Description
Required

ID

string

Unique 24-hexadecimal digit string that identifies this Atlas Search index.

true

message

string

Details on the status of the search index.

true

name

string

Human-readable label that identifies this index.

true

status

string

Condition of the search index.

true

Name
Type
Description
Required

_id

string

ID is the identifier of the Serverless PrivateLink Service.

false

cloudProviderEndpointId

string

CloudProviderEndpointID is the identifier of the cloud provider endpoint.

false

endpointServiceName

string

EndpointServiceName is the name of the PrivateLink endpoint service in AWS. Returns null while the endpoint service is being created.

false

errorMessage

string

ErrorMessage is the error message if the Serverless PrivateLink Service failed to create or connect.

false

name

string

Name is the name of the Serverless PrivateLink Service. Should be unique.

false

privateEndpointIpAddress

string

PrivateEndpointIPAddress is the IPv4 address of the private endpoint in your Azure VNet that someone added to this private endpoint service.

false

privateLinkServiceResourceId

string

PrivateLinkServiceResourceID is the root-relative path that identifies the Azure Private Link Service that MongoDB Cloud manages. MongoDB Cloud returns null while it creates the endpoint service.

false

providerName

string

ProviderName is human-readable label that identifies the cloud provider. Values include AWS or AZURE.

false

status

string

Status of the AWS Serverless PrivateLink connection.

false

Back

AtlasProject

On this page