KubeBlocks
BlogsSkillsEnterprise
⌘K
​
Blogs
Overview
Quickstart

Operations

Lifecycle Management
Vertical Scaling
Horizontal Scaling
Volume Expansion
Manage MongoDB Services
Modify MongoDB Parameters
MongoDB Switchover
Decommission MongoDB Replica

Custom Secret

Custom Password

tpl

    KubeBlocks uses a declarative approach for managing MongoDB Replication Clusters. Below is an example configuration for deploying a MongoDB ReplicaSet Cluster with one primary replica and two secondary replicas.

    Apply the following YAML configuration to deploy the cluster:

    apiVersion: apps.kubeblocks.io/v1 kind: Cluster metadata: name: mongo-cluster namespace: demo spec: terminationPolicy: Delete clusterDef: mongodb topology: replicaset componentSpecs: - name: mongodb serviceVersion: "6.0.21" replicas: 3 resources: limits: cpu: '0.5' memory: 0.5Gi requests: cpu: '0.5' memory: 0.5Gi volumeClaimTemplates: - name: data spec: storageClassName: "" accessModes: - ReadWriteOnce resources: requests: storage: 20Gi

    © 2026 KUBEBLOCKS INC