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

MongoDB 마이그레이션 리소스 설정

중요

The settings on this page exist to support migrating a self-managed deployment into Kubernetes under Kubernetes Operator. Do not set them on a MongoDB resource that you deploy directly in Kubernetes without an accompanying migration.

This page documents the MongoDB resource fields, status conditions, and annotations that apply only during a migration from a self-managed, virtual-machine deployment into Kubernetes. For the full set of MongoDB resource settings, see MongoDB Database Resource Specification.

These fields identify the source virtual machine or bare-metal processes that a migration is extending into Kubernetes. They apply to the MongoDB resource, apiVersion: mongodb.com/v1.

중요

These fields exist for migration only. Do not set them on a MongoDB resource for a greenfield Kubernetes deployment.

spec.externalMembers

Type: array of ExternalMember objects

마이그레이션 의 일부인 가상 머신 또는 베어메탈 소스 프로세스. 이 필드 마이그레이션 용으로만 존재합니다.

You may remove entries from this list, but you must never add entries once migration has started. An empty spec.externalMembers list means the migration is complete.

spec.externalMembers[].processName

유형: 문자열

필수 사항

This field exists for migration only. The process name exactly as it appears in the processes array of the automation config.

spec.externalMembers[].hostname

유형: 문자열

필수 사항

This field exists for migration only. The host:port value for the process, exactly as it appears in the automation config.

spec.externalMembers[].type

Type: enum: mongod or mongos

샤딩된 클러스터에 필요

This field exists for migration only. A replica set has only mongod external members.

spec.externalMembers[].replicaSetName

유형: 문자열

옵션

This field exists for migration only. Required for a sharded-cluster mongod external member. Identifies whether the process belongs to the config server replica set or to a specific shard's replica set.

이러한 필드는 마이그레이션 용으로만 존재하며, 그렇지 않으면 Kubernetes Operator가 사용하거나 생성할 리소스 또는 자동화 구성 이름을 재정의합니다.

spec.replicaSetNameOverride

유형: 문자열

This field exists for migration only. The automation config replica set name, when it differs from the Kubernetes resource name, or when the automation config replica set name is not a valid Kubernetes name. The kubectl mongodb migrate-to-mck plugin sets this field for you through its --resource-name-override flag.

spec.configServerNameOverride

유형: 문자열

이 필드 마이그레이션 용으로만 존재합니다. 자동화 구성에 표시되는 config 서버 복제본 세트 이름입니다.

spec.shardNameOverrides

Type: array of ShardNameOverride objects

This field exists for migration only. Per-shard automation config replica set name and shard _id.

참고

Do not confuse spec.shardNameOverrides with spec.shardOverrides. spec.shardOverrides configures per-shard resource settings and is unrelated to migration naming.

Kubernetes StatefulSet names are never affected by these overrides.

Kubernetes Operator는 이전에 이러한 자동화 구성 설정을 하드 코딩했습니다. 마이그레이션하려면 Kubernetes 배포서버 소스 가상 머신에서 이미 사용 중인 경로와 일치할 수 있도록 구성해야 합니다.

spec.downloadBase

유형: 문자열

기본값: /var/lib/mongodb-mms-automation

Directory where the MongoDB Agent downloads the agent binary. Kubernetes Operator derives the keyfile path from this setting as <downloadBase>/keyfile.

spec.security.tls.caFilePath

유형: 문자열

기본값: /mongodb-automation/tls/ca/ca-pem

Kubernetes Operator가 포드 내부에 CA 인증서를 프로젝션하는 절대 경로입니다. 이 경로에는 경로 세그먼트가 두 개 이상 포함되어야 합니다. 애플리케이션 데이터베이스는 지원되지 않습니다.

참고

If your pod template mounts a volume at or above this path, the mount can shadow the projected CA file. Review your podTemplate volume mounts before you set a custom value.

spec.security.authentication.agents.autoPEMKeyFilePath

유형: 문자열

Absolute path of the MongoDB Agent's combined PEM file inside database pods. Setting this field sets the Ops Manager or Cloud Manager tls.autoPEMKeyFilePath value, and mounts the secret referenced by spec.security.authentication.agents.clientCertificateSecretRef at that path.

Requires spec.security.authentication.agents.clientCertificateSecretRef.

기본값은 Kubernetes Operator가 마이그레이션되지 않은 배포에 사용하는 해시 파생 에이전트 인증서 마운트 경로입니다.

status.conditions

Type: array of Kubernetes Conditions

Standard Kubernetes conditions, keyed by type. This field is new on the MongoDB resource and supports migration.

status.conditions[type=Migrating]

유형: Kubernetes 조건

The top-level indicator of whether a migration is active. status is True while spec.externalMembers is non-empty, and flips to False with reason MigrationComplete once you remove the last external member.

이유
상태
의미

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.

status.conditions[type=NetworkConnectivityVerified]

Type: Kubernetes condition

The result of the dry-run connectivity check. Kubernetes Operator removes this condition from status.conditions entirely once no external members remain.

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

작업이 아직 실행 .

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.

status.migrationObservedExternalMembersCount

유형: integer

The number of spec.externalMembers entries that Kubernetes Operator observed on the last reconcile. Kubernetes Operator compares this value against the current spec.externalMembers count on the next reconcile to detect that you pruned an external member. This field is unset when no external members remain.

참고

This field also appears in the MongoDBOpsManager custom resource schema, as a side effect of Go struct embedding. On the MongoDBOpsManager resource, the field is always null. Ignore it there.

metadata.annotations.mongodb.com/migration-dry-run

유형: 문자열(부울 값)

The kubectl mongodb migrate-to-mck plugin sets this annotation to true. While this annotation is present, Kubernetes Operator makes no automation config changes and performs connectivity validation only. Removing the annotation starts the real migration.

metadata.annotations.mongodb.com/migrate-tool-version

유형: 문자열

Records the version of the kubectl mongodb migrate-to-mck plugin that generated the resource. Kubernetes Operator validates this annotation against its own version on every reconcile, including during the dry run.

The following existing MongoDB resource fields are not migration-only, but require specific values or review during a migration: