MongoDB Controllers for Kubernetes Operator deploys MongoDB Enterprise, Ops Manager, and MongoDB Community to Kubernetes. This page helps you choose a deployment path and an installation method before you install. If you are new to Kubernetes Operator, start with the Quick Start.
选择您的部署路径
Kubernetes 操作符支持从局部评估集群到跨多个 Kubernetes 集群的生产部署的部署。选择适合您目标的路径。
Deploys Ops Manager and a MongoDB replica set to a single-node Kind cluster on your local machine. 如果您想对 Kubernetes Operator 进行端到端评估、了解自定义资源如何协同工作或在本地重现问题,请选择快速入门。 It is less ideal when you need a deployment that survives node or cluster loss, because Kind runs one node. | |
Deploys Ops Manager and MongoDB resources to one production Kubernetes cluster. 如果可用性要求在一个 Kubernetes 集群内得到满足,并且您希望操作的基础设施最少,请选择单集群部署。 当您必须在整个 Kubernetes 集群或区域丢失后仍能继续运行时,这种方式并不理想。 | |
在有服务网格或没有服务网格的情况下,将一个 MongoDB 部署部署到多个 Kubernetes 集群。 当您需要将副本集节点分布到区域或数据中心以实现更高的可用性和灾难恢复时,请选择多集群部署。 当您评估 Kubernetes 操作符时,这种方法并不理想,因为它需要您配置和操作多个 Kubernetes 集群。 |
To deploy MongoDB Community to Kubernetes, see the MongoDB Community documentation on GitHub. Because of the breadth of configuration options available for MongoDB Enterprise and Ops Manager, this guide covers those deployments.
选择您的安装方法
每种方法都安装相同的 Kubernetes 操作符。要了解每种方法的更多信息,请参阅 为 Kubernetes 操作符安装 MongoDB 控制器。
Applies the YAML manifests that MongoDB publishes. 当在源控制中保留显示时,或在应用显示之前想要查看和编辑显示时,请选择 It is less ideal when you want to set configuration without editing YAML. | |
安装 如果您希望通过值而非显示来配置 Kubernetes 操作符,或者您需要仅 Helm 才提供的选项(例如 监视命名空间子集。),请选择 Helm。 当您的组织不允许 Helm 时,这种方法并不理想。 | |
使用 运行 OpenShift Container Platform 时选择此方法,这需要 对任何非 OpenShift Kubernetes 分发版来说,这不是很理想的选择。 |
Kubernetes 操作符的工作原理
企业 MongoDB 部署包含两种不同的资源类型:数据库本身和负责备份数据、自动化(部署、配置、升级)、实时监控等的外部数据库管理资源。该外部资源可以是 MongoDB Ops Manager(自管理资源)或 Cloud Manager(管理等效资源)。
Community MongoDB 部署仅包含数据库资源,不包含外部管理资源。
Kubernetes 操作符允许您根据特定需求,在一个或多个 Kubernetes 集群中以多种配置创建这些资源并管理部署的所有方面。
Kubernetes Operator is a Kubernetes Controller, which works by effectively extending the native Kubernetes API to include the aforementioned MongoDB elements as custom resources, so that you can define and deploy them with YAML manifests in the same way as any other resources to Kubernetes.
尽管 MongoDB 和 MongoDB Ops Manager 自定义资源可以作为独立运行的实例部署,但推荐的部署拓扑是将数据库和 MongoDB Ops Manager 部署为 StatefulSet,如上图所示。此外,Kubernetes 操作符 要求在 Kubernetes 集群中提供 storageClass(在托管集群中默认可用),以创建负责存储和备份数据的 PersistentVolumes。
要了解有关使用 Kubernetes 操作符在 Kubernetes 中部署 MongoDB 的具体系统要求和前提条件,请参阅前提条件页面。
MongoDB Controllers for Kubernetes Operator 是一个操作符替换之前的MongoDB Enterprise Kubernetes Operator 和MongoDB Community Operator 的 Operator。有关Kubernetes Operator 第一个版本的更多信息,请参阅发布说明。