AI 에이전트의 경우: 문서 인덱스는 https://www.mongodb.com/ko-kr/docs/llms.txt에서 사용할 수 있으며, 모든 페이지의 마크다운 버전은 어떤 URL 경로에 .md를 추가하여 사용할 수 있습니다.
Docs Menu

Kubernetes 로의 마이그레이션 문제 해결

This page helps you diagnose problems that can occur while you migrate a self-managed replica set or sharded cluster from virtual machines into Kubernetes under Kubernetes Operator, including plugin import failures, dry-run and connectivity problems, authentication mismatches, and validation errors. For background on the migration workflow, see Migrate a Self-Managed Deployment to Kubernetes.

Read the reason field of the status.conditions[type=Migrating] condition first.

이유
상태
의미

Validating

True

테스트 실행 주석이 설정하다 되었습니다.

Extending

True

원하는 Kubernetes 멤버 수가 마지막으로 조정된 수를 초과했습니다.

Pruning

True

The externalMembers count dropped below status.migrationObservedExternalMembersCount.

InProgress

True

외부 멤버가 있지만 변경되는 것은 없습니다. 이것이 첫 번째 화해의 이유이기도 합니다.

MigrationComplete

False

모든 외부 멤버가 제거되었습니다.

Precedence is Validating > Extending > Pruning > InProgress. A prune that also grows the Kubernetes side reports Extending, which is another reason to make one change at a time.

가지 치기와 확장은 동시에 허용되지 않습니다.

To script against migration completion, use kubectl wait --for=condition=Migrating=False rather than polling status.phase.

  • If the reason stays Extending, the Kubernetes members that Kubernetes Operator is adding are still provisioning. Wait for them to reach goal state.

  • If the reason stays InProgress and the external member count is unchanged, your last edit to the resource was a no-op: Kubernetes Operator did not detect a change that requires action.

The kubectl mongodb migrate-to-mck plugin validates the source automation config before it generates any resource. It exits with an error, rather than generating an incomplete or incorrect resource, in each of the following cases:

  • The Ops Manager or Cloud Manager project has more than one deployment.

  • 프로젝트 에 샤딩된 클러스터 두 개 이상 있습니다.

  • 프로젝트 에 샤딩된 클러스터 의 일부가 아닌 복제본 세트가 있습니다.

  • 프로젝트 복제본 세트나 샤딩된 클러스터가 없습니다. 플러그인은 복제본 세트 와 샤딩된 클러스터 배포만 마이그레이션 할 수 있습니다.

  • 자동화 구성에 프로세스가 없습니다.

  • 샤딩된 클러스터 의 샤드 config 서버 와 동일한 복제본 세트 로 지원됩니다. 이 embedded-config-server 토폴로지 마이그레이션 이 지원되지 않습니다.

  • 플러그인은 복제본 세트 에서 투표권이 있는 우선순위 적격 멤버를 찾을 수 없으므로 해당 복제본 세트 의 소스 프로세스 결정할 수 없습니다.

  • A process has a processType other than mongod or mongos.

플러그인은 Kubernetes Operator의 예상과 일치하지 않는 경우 다음 자동화 구성 설정에 플래그를 지정합니다.

  • auth.keyFile differs from the path that Kubernetes Operator derives from spec.downloadBase.

  • auth.keyFileWindows 이 설정하다 있습니다.

  • monitoringAgentConfig.logPath or backupAgentConfig.logPath is set to a non-default path.

  • A process has an authSchemaVersion that differs from the Kubernetes Operator default.

  • auth.autoUser 인증 활성화된 동안은 비어 있습니다.

  • auth.autoUser has no matching entry in auth.usersWanted for its database. Without a matching entry, agent authentication fails after migration.

  • MONGODB-X509 agent authentication requires tls.autoPEMKeyFilePath to be set in the automation config. See spec.security.authentication.agents.autoPEMKeyFilePath.

  • An LDAP bindMethod other than simple is not supported for migration.

Kubernetes Operator takes spec.additionalMongodConfig and spec.agent.mongod.systemLog from a single source process. If your replica set members have different configurations, review all members and reconcile the differences before you migrate — the generated resource applies one configuration to all Kubernetes members.

다음 프로세스별 자동화 구성 설정은 새 Kubernetes 멤버에게 적용되지 않습니다. 마이그레이션 하기 전에 다음을 계획하세요.

  • secondaryDelaySecs

  • 숨겨진 멤버

  • buildIndexes: false

소스 배포서버 분석 노드 또는 지연 노드가 있는 경우 시작하기 전에 Kubernetes 에서 이를 어떻게 나타낼지 계획하세요.

검토 할 추가 항목:

  • 플러그인은 비활성화된 프로세스 건너뜁니다. 즉, 외부 멤버로 표시되지 않습니다.

  • If a process has no TLS configured, set net.tls.mode to disabled in Ops Manager or Cloud Manager, on the existing virtual machine deployment, before you migrate. Do not set this on the generated MongoDB resource. Otherwise the Kubernetes member's TLS setting does not match the source process, and migration causes an unplanned deployment change.

  • If a process's logRotate or auditLogRotate setting differs from the project-level configuration, Kubernetes Operator uses the project-level value.

The mongodb.com/migrate-tool-version annotation records the kubectl mongodb migrate-to-mck plugin version that generated the resource. Kubernetes Operator validates this annotation against its own version on every reconcile, including during the dry run. If the versions are incompatible, regenerate the resource with a compatible plugin version.

Delete the <resourceName>-connectivity-check Job. The next reconcile re-creates it.

If the Job never gets created, check that your Kubernetes RBAC permissions include batch/jobs. Missing batch/jobs permissions prevent Kubernetes Operator from creating the connectivity validator Job.

유효성 검사기 작업 종료 코드
조건 상태
이유
의미

작업이 아직 실행 .

Unknown

Running

The status.phase is ConnectivityCheckRunning.

0

True

NetworkValidationPassed

모든 외부 멤버에 연결할 수 있고 인증됩니다.

2

False

AuthenticationFailed

Credentials, the authentication mechanism, or a missing __system@local role.

3

False

NetworkFailed

DNS, TLS, 시간 초과 또는 연결할 수 없는 멤버. Job Pod 로그를 확인합니다.

1 또는 기타

False

UnknownError

분류되지 않은 오류입니다. Job Pod 로그를 확인합니다.

Failures that occur before the Job starts use the reasons OperatorImageUnknown, BuildStatefulSetOptions, AgentCertSecretFailed, and AgentCertSubject.

Kubernetes Operator removes the NetworkConnectivityVerified condition from status.conditions entirely once no external members remain.

연결 유효성 검사기 작업이 시작되기 전에 Kubernetes Operator가 실패할 수 있는 원인은 다음과 같습니다.

  • OperatorImageUnknown

  • BuildStatefulSetOptions

  • AgentCertSecretFailed

  • AgentCertSubject

Kubernetes 구성원의 인증서는 가상 머신 구성원의 인증서에 서명한 동일한 인증 기관에서 발급해야 합니다. 그렇지 않으면 가상 머신과 Kubernetes 멤버 간의 연결 유효성 유효성 검사 및 복제 실패합니다.

  • spec.memberConfig has fewer entries than spec.members. Add one entry per member.

  • Kubernetes Operator ignores the top-level spec.memberConfig field for sharded clusters.

경고

멤버 수를 늘리기 전에 spec.memberConfig를 설정하세요.

By default, new Kubernetes members join as voting members. The CRD defaults are votes: 1 and priority: "1", which let a still-syncing member participate in an election before it has finished its initial sync.

MongoDB recommends that you write one spec.memberConfig entry per new Kubernetes member with votes: 0 and priority: "0" before you raise the member count, so that a still-syncing member cannot win an election. votes is an integer. priority is a string.

리소스 이름 또는 복제본 세트 이름이 너무 길거나 유효한 RFC 1123 이름이 아닙니다.spec.replicaSetNameOverride 또는 --resource-name-override를 사용하여 유효한 Kubernetes 이름을 제공하세요.

  • Validations can fire while the dry-run annotation (mongodb.com/migration-dry-run) is set, not only after you start the real migration.

  • 투표 멤버 제한 유효성 검사 제한을 초과하는 변경 사항이 간접적으로 적용되는 경우 허용 시간이 아닌 조정 시 표시될 수 있습니다.

  • 너무 많은 변경 사항을 한 번의 편집으로 일괄 처리하면 배포서버 쿼럼이 손실될 수 있습니다. 한 번에 한 가지 종류의 변경만 수행할 수 있습니다: Kubernetes 멤버 추가, 외부 멤버 정리, 투표 및 우선 순위 변경.

위의 섹션을 진행한 후에도 문제가 지속되면 지원 에 문의 하기 전에 다음 항목을 수집하세요.

  • The MongoDB resource YAML, including status.conditions:

    kubectl get mdb <resource-name> -n <namespace> -o yaml
  • The MongoDBUser resources for the deployment.

  • Kubernetes 연산자 로그.

  • 연결 유효성 검사기 작업의 포드 로그입니다.

  • The automation config JSON from Ops Manager or Cloud Manager.

Then, contact Technical Support.