对于 AI 代理:可在 https://www.mongodb.com/zh-cn/docs/llms.txt 获取文档索引—通过在任何 URL 路径后添加 .md 可获取所有页面的 Markdown 版本。
Docs 菜单

迁移到Kubernetes 的先决条件

在开始将自托管部署迁移到Kubernetes之前,请确认此页面上的每个先决条件。

  • A Ops Manager or Cloud Manager connection ConfigMap with the keys baseUrl, orgId, and projectName.

  • An API key Secret with the keys publicKey and privateKey.

  • The Kubernetes Operator ServiceAccount has batch/jobs permissions (create, get, list, watch, and delete) for the dry-run connectivity Job.

  • 该项目只包含一个部署。

你需要:

  • An existing replica set or sharded cluster that Ops Manager or Cloud Manager manages.

  • 已安装Kubernetes Operator 的一个或多个Kubernetes集群。对于多集群目标,在开始迁移之前预配每个集群并将其置于操作符管理之下,并确认跨集群 FQDN 解析已正常运行。

  • 正常运行且处于目标状态的部署。

你需要:

  • The kubectl mongodb plugin, at a version that matches Kubernetes Operator. Kubernetes Operator enforces this version match on every reconcile, including the dry run, through the mongodb.com/migrate-tool-version annotation.

  • Operator Role-Based Access Control (RBAC) restricts system access based on assigned roles. Here, it includes batch/jobs permissions (create, get, list, watch, and delete), which Kubernetes Operator requires to run the dry-run connectivity Job.

你需要:

  • Bidirectional network connectivity between the virtual machine hosts and the Kubernetes Pods. You provision this connectivity yourself. Agent-to-mongod and mongod-to-mongod traffic must flow in both directions across the boundary, and your drivers must reach both sides.

  • cert-manager 或等效证书颁发者(如果部署使用 TLS)。

你需要:

  • 已掌握SCRAM用户密码。您无法从自动化配置中恢复它们,因为自动化配置仅存储盐、服务器密钥和存储的密钥。

  • 开始之前进行的备份。

迁移支持副本集和分片的集群。它支持 No Auth、 SCRAM-SHA-256、X.509、 LDAP和 TLS 的任意组合。当您使用LDAP时,bindMethod 必须是 simple