Managed MongoDB Service

MongoDB is a popular document-oriented NoSQL database known for its flexibility and scalability. The Managed MongoDB Service provides a self-healing replicated cluster managed by the Percona Operator for MongoDB.

Deployment Details

This managed service is controlled by the Percona Operator for MongoDB, ensuring efficient management and seamless operation.

Deployment Modes

Replica Set Mode (default)

By default, MongoDB deploys as a replica set with the specified number of replicas. This mode is suitable for most use cases requiring high availability.

Sharded Cluster Mode

Enable sharding: true for horizontal scaling across multiple shards. Each shard is a replica set, and mongos routers handle query routing.

Notes

External Access

When external: true is enabled:

  • Replica Set mode: Traffic is load-balanced across all replica set members. This works well for read operations, but write operations require connecting to the primary. MongoDB drivers handle primary discovery automatically using the replica set connection string.
  • Sharded mode: Traffic is routed through mongos routers, which handle both reads and writes correctly.

Credentials

On first install, the credentials secret will be empty until the Percona operator initializes the cluster. Run helm upgrade after MongoDB is ready to populate the credentials secret with the actual password.

Parameters

Common parameters

NameDescriptionTypeValue
replicasNumber of MongoDB replicas in replica set.int3
resourcesExplicit CPU and memory configuration for each MongoDB replica. When omitted, the preset defined in resourcesPreset is applied.object{}
resources.cpuCPU available to each replica.quantity""
resources.memoryMemory (RAM) available to each replica.quantity""
resourcesPresetDefault sizing preset used when resources is omitted.stringsmall
sizePersistent Volume Claim size available for application data.quantity10Gi
storageClassStorageClass used to store the data.string""
externalEnable external access from outside the cluster.boolfalse
versionMongoDB major version to deploy.stringv8

Image configuration

NameDescriptionTypeValue
imagesContainer images used by the operator.object{}
images.pmmPMM client image for monitoring.stringpercona/pmm-client:2.44.1
images.backupPercona Backup for MongoDB image.stringpercona/percona-backup-mongodb:2.11.0

Sharding configuration

NameDescriptionTypeValue
shardingEnable sharded cluster mode. When disabled, deploys a replica set.boolfalse
shardingConfigConfiguration for sharded cluster mode.object{}
shardingConfig.configServersNumber of config server replicas.int3
shardingConfig.configServerSizePVC size for config servers.quantity3Gi
shardingConfig.mongosNumber of mongos router replicas.int2
shardingConfig.shardsList of shard configurations.[]object[...]
shardingConfig.shards[i].nameShard name.string""
shardingConfig.shards[i].replicasNumber of replicas in this shard.int0
shardingConfig.shards[i].sizePVC size for this shard.quantity""

Users configuration

NameDescriptionTypeValue
usersCustom MongoDB users configuration map.map[string]object{}
users[name].passwordPassword for the user (auto-generated if omitted).string""
users[name].dbDatabase to authenticate against.string""
users[name].rolesList of MongoDB roles with database scope.[]object[]
users[name].roles[i].nameRole name (e.g., readWrite, dbAdmin, clusterAdmin).string""
users[name].roles[i].dbDatabase the role applies to.string""

Backup parameters

NameDescriptionTypeValue
backupBackup configuration.object{}
backup.enabledEnable regular backups.boolfalse
backup.scheduleCron schedule for automated backups.string0 2 * * *
backup.retentionPolicyRetention policy (e.g. “30d”).string30d
backup.destinationPathDestination path for backups (e.g. s3://bucket/path/).strings3://bucket/path/to/folder/
backup.endpointURLS3 endpoint URL for uploads.stringhttp://minio-gateway-service:9000
backup.s3AccessKeyAccess key for S3 authentication.string""
backup.s3SecretKeySecret key for S3 authentication.string""

Bootstrap (recovery) parameters

NameDescriptionTypeValue
bootstrapBootstrap configuration.object{}
bootstrap.enabledWhether to restore from a backup.boolfalse
bootstrap.recoveryTimeTimestamp for point-in-time recovery; empty means latest.string""
bootstrap.backupNameName of backup to restore from.string""