Operations
Backup And Restores
Custom Secret
tpl
MongoDB is a NoSQL document database designed for flexibility, scalability, and high performance. Unlike traditional relational databases (SQL), MongoDB stores data in JSON-like documents (BSON format), making it ideal for unstructured or semi-structured data.
replicaset
A MongoDB replica set is a group of MongoDB servers that maintain the same dataset, providing high availability and data redundancy. Replica sets are the foundation of MongoDB's fault tolerance and data reliability. By replicating data across multiple nodes, MongoDB ensures that if one server fails, another can take over seamlessly without affecting the application's availability.
In a replica set, there are typically three types of nodes:
And it is recommended to create a cluster with at least three nodes to ensure high availability, one primary and two secondary nodes.
KubeBlocks simplifies MongoDB operations with comprehensive lifecycle management:
Feature | Description |
---|---|
Horizontal Scaling | Scale replicas in/out to adjust capacity |
Vertical Scaling | Adjust CPU/memory resources for MongoDB instances |
Volume Expansion | Dynamically increase storage capacity without downtime |
Restart Operations | Controlled cluster restarts with minimal disruption |
Start/Stop | Temporarily suspend/resume cluster operations |
Password Management | Ability to set and manage custom root password for the MongoDB cluster during creation |
Custom Services | Expose specialized database endpoints |
Switchover | Planned primary-replica role changes |
Replica Management | Safely decommission or rebuild specific replicas |
Version Upgrades | Perform minor version upgrades seamlessly |
Advanced Scheduling | Customize pod placement and resource allocation |
Monitoring | Integrated Prometheus metrics collection |
Logging | Centralized logs via Loki Stack |
KubeBlocks supports multiple backup strategies for MongoDB:
Feature | Method | Description |
---|---|---|
Full Backup | dump | Uses mongodump , a MongoDB utility used to create a binary export of the contents of a database |
Full Backup | datafile | Backup the data files of the database |
Continuous Backup | archive-oplog | Continuously archives MongoDB oplog using wal-g |
KubeBlocks MongoDB Addon supports these MongoDB versions:
Major Version | Supported Minor Versions |
---|---|
4.0 | 4.0.28,4.2.24,4.4.29 |
5.0 | 5.0.28 |
6.0 | 6.0.22,6.0.20,6.0.16 |
7.0 | 7.0.19,7.0.16,7.0.12 |
8.0 | 8.0.8,8.0.6,8.0.4 |
The list of supported versions can be found by following command:
kubectl get cmpv mongodb