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

迁移限制和不支持的场景

在计划将自托管部署迁移到Kubernetes之前,请查看此页面中的限制。有些限制会完全区块迁移,而其他限制则要求您针对缺失的功能进行规划。

The Ops Manager or Cloud Manager project must contain exactly one deployment. The kubectl mongodb plugin errors out if the project contains more than one deployment.

If your project contains multiple deployments, split them into separate projects before you migrate. To learn how, see Migrate a MongoDB Deployment to a New Project in the Ops Manager documentation.

如果分片集群的配置服务器也由其某一分片支持,则无法迁移该集群。 Kubernetes Operator 会检测嵌入式配置服务器,并在导入时拒绝迁移。

试运行仅验证从Kubernetes到虚拟机的连接。它不会自动检查虚拟机到 Kubernetes 的入站连接。在依赖连接方向之前,请自行验证连接方向。

在迁移开始后,不存在自动撤销迁移的方法。在开始之前规划迁移并进行备份,因为您无法通过 插件 或操作符进行恢复。

要手动回滚正在进行的迁移,请执行以下操作:

1

此步骤至关重要。不要跳过它。

2

This step is critical. Do not skip it.

3

Edit the automation config directly in Ops Manager or Cloud Manager.

警告

If you delete the MongoDB resource while Kubernetes Operator is still running, Kubernetes Operator does not delete the project in Ops Manager or Cloud Manager, to protect the external members. However, Kubernetes Operator automatically deletes the StatefulSets and Pods for that resource. Depending on how far the migration has progressed, deleting these Pods can cause the replica set to lose its voting majority.

迁移仅通过MongoDB复制移动数据。 Kubernetes Operator 不会通过任何其他机制将数据播种或预复制到新的Kubernetes成员中。

Removing external members is a manual operation. You remove entries from spec.externalMembers one at a time. The operator does not automate this step for you.

This workflow migrates only the MongoDB deployment that Ops Manager or Cloud Manager manages. It does not migrate Ops Manager or Cloud Manager itself.

While a migration is in progress, do not make version or configuration changes to the deployment outside the migration steps. Concurrent edits through the Ops Manager UI are also unsupported during migration.

某些字段预计会在迁移过程中发生变化:

  • Member counts and the votes and priority fields in memberConfig change as you extend, promote, and prune members.

其他设置必须在整个迁移中与源部署匹配,并且不得更改:

  • MongoDB 版本

  • 特征兼容性版本

  • 端口

  • 身份验证模式

  • 内部集群身份验证

在迁移之前规划这些设置,因为Kubernetes Operator 不会在新的Kubernetes成员上重现这些设置:

  • secondaryDelaySecs 在延时节点上。

  • 隐藏节点上的隐藏设置。

  • buildIndexes set to false on a member.

如果在虚拟机上运行分析节点或延迟节点,请在 Kubernetes 成员加入副本集后,自行在Kubernetes成员上重新配置等效设置。

Kubernetes Operator does not support migration on MongoDBMultiCluster resource. The spec.externalMembers field was deliberately not added to that CRD. No MongoDBProject CRD exists.