Mastering MongoDB on Kubernetes, the power of operators
MongoDB's natural capabilities like replication, sharding (partitioning data and holding different pieces in separate instances/pods) or failover (failing over from the master, read-write node to other read-only nodes, and promoting the read-only node as the master) can more easily deal with the uncertainty of heterogeneous cloud environments, which makes this database good candidate to launch on Kubernetes cluster. ustom resources allow the Kubernetes API to be extended with domain-specific logic, defining new resource types and controllers.
The Operator pattern makes use of custom resources to manage applications, for example, databases and their components by helping the development of custom solutions. MongoDB Community Kubernetes Operator and MongoDB Enterprise Kubernetes operator extend Kubernetes API by MongoDB specifics objects like ReplicaSet or ShardedCluster.
The Operator manages the typical lifecycle events for a MongoDB cluster: provisioning storage and computing power, configuring network connections, setting up users, and changing these settings as needed. It accomplishes this using the Kubernetes API and tools. You provide the Operator with the specifications for your MongoDB cluster. The Operator uses this information to tell Kubernetes how to configure that cluster including provisioning storage, setting up the network connections, and configuring other resources.