Navigation

Multi-Cluster Architecture

Features Not Available in the Beta Release

Important

Use the beta release of the multi-cluster deployments only in development environments.

The following features of the MongoDB Enterprise Kubernetes Operator and the underlying Kubernetes clusters are not available in the beta release of the multi-cluster deployments:

  • Sharded cluster deployments
  • LDAP authentication
  • Ops Manager version earlier than 5.0.7

Multi-Cluster Capabilities

This section describes the multi-cluster capabilities that you can configure using the same procedures as for single clusters deployed with the Kubernetes Operator. Other multi-cluster capabilities have their own documentation in this guide.

Capability Description
Use DNS SRV records for MongoDB access in multi-cluster deployments To connect to the multi-cluster deployment database as a user, you can use the connectionString.standardSrv: DNS seed list connection string. This string is included in the secret that the Kubernetes Operator creates for your multi-cluster deployment. Use the same procedure for connecting to the multi-cluster deployment as for single clusters deployed with Kubernetes Operator. See Connect to a MongoDB Database Resource from Inside Kubernetes, and select the tab Using the Kubernetes Secret.
Secure database users in multi-cluster deployments

Use these procedures:

These procedures are the same as for single clusters deployed with Kubernetes Operator, with the following exceptions:

  • The procedures apply to replica sets only. Multi-cluster deployments do not support creating sharded clusters.
  • In the mongodbResourceRef, specify the name of the multi-cluster replica set: name: "<my-multi-cluster-replica-set>".
Configure queryable backups for Ops Manager resources If you deploy Ops Manager with the Kubernetes Operator, the central cluster may also host Ops Manager. In this case, you can configure queryable backups for Ops Manager resources.

Multi-Cluster Deployment Architecture

The MongoDB Enterprise Kubernetes Operator runs in a central Kubernetes cluster.

The central cluster holds the MongoDBMulti CustomResource spec for the MongoDB replica set. The member Kubernetes clusters host the MongoDB replica sets.

If you deploy Ops Manager with the Kubernetes Operator, the central cluster may also host Ops Manager. Istio manages the discovery of MongoDB nodes deployed in different Kubernetes member clusters.

You can host your application on any of the member clusters inside the Istio service mesh, either on Kubernetes clusters outside of the ones that you deploy with the Kubernetes Operator, or on the member clusters that you deploy as part of this tutorial.

The MongoDB Enterprise Kubernetes Operator performs these actions:

  • Identifies the cluster on which to deploy the MongoDB replica set using the corresponding MongoDBMulti CustomResource spec, and deploys the MongoDB replica sets.

  • Watches for the MongoDBMulti CustomResource spec creation in the central cluster.

  • Uses the mounted kubeconfig file to communicate with member clusters.

  • Watches for the CentralCluster and MemberCluster events to confirm that the multi-cluster deployment is in the desired state.

  • Reconciles resources. Creates the necessary resources, such as Configmaps, Secrets, Service objects, and Statefulset objects in each member cluster corresponding to the number of replica set members in the MongoDB cluster.

    Note

    To avoid storing secrets in Kubernetes, you can migrate all secrets to a secret storage tool.

The following diagram shows the high-level architecture of a multi-cluster deployment across regions and availability zones:

Diagram showing the high-level architecture of a multi-cluster deployment across regions and availability zones using the MongoDB Enterprise Kubernetes Operator