Kubernetes Operator can migrate a deployment that Ops Manager or Cloud Manager manages on virtual machines or bare metal into Kubernetes. The migration is live and incremental. Your deployment keeps serving reads and writes throughout the process. You move members from the virtual machines to Kubernetes one at a time, using normal MongoDB replication.
마이그레이션 작동 방식
마이그레이션은 데이터 복사 도구가 아닌 표준 MongoDB 복제 사용합니다. 세 단계로 진행됩니다.
확장합니다. 기존 복제본 세트 에 Kubernetes 멤버를 추가합니다. Kubernetes Operator는 새 멤버를 투표권이 없는 멤버로 생성하고, 기존 멤버로부터 초기 동기화 수행합니다.
승격. 가상 머신 멤버에서 Kubernetes 멤버로 투표 및 우선 순위 이전합니다. 외부 멤버는 제거 때까지 소스 자동화 구성에서 이미 가지고 있는 투표권과 우선 순위 그대로 유지합니다.
정리합니다. 가상 머신 구성원을 한 번에 하나씩 제거 각 제거 사이에 복제본 세트 목표 상태 도달할 때까지 기다립니다.
Kubernetes Operator가 구성원의 100%를 관리하고, spec.externalMembers이 비어 있고, 모든 데이터가 Kubernetes 영구 볼륨 클레임에 있으면 마이그레이션이 완료된 것입니다. 이 점 에는 가상 머신에 멤버가 남아 있지 않습니다.
마이그레이션에서 스냅샷 복원 또는 Cluster-to-Cluster Sync 사용하지 않는 이유
The migration workflow does not restore a snapshot and does not use mongosync or another cluster-to-cluster sync tool. Cluster-to-cluster sync tools impose downtime at cutover, lack support for time-series collections, and generally require field help to run safely. Replication-based migration avoids these limitations. Your deployment stays available, the migration supports the same collection types as the rest of your deployment, and you drive the process yourself with the kubectl mongodb plugin.
마이그레이션 중 가용성
읽기는 마이그레이션 내내 계속 사용할 수 있습니다. 투표 중에는 쓰기가 잠시 실패할 수 있으므로 드라이버는 재시도 가능 쓰기를 사용해야 합니다. 읽기 대상이 이동하면 읽기 지연 시간 증가할 수 있으므로 가상 머신과 동일한 리전 에서 Kubernetes 클러스터 실행 . 정지 모드 가 없기 때문에 마이그레이션된 세컨더리 중단에 대한 장기 실행 커서.
하이브리드 작업은 일시적입니다.
마이그레이션 진행되는 동안 배포서버 가상 머신과 Kubernetes 로 분할 멤버가 있는 하이브리드 상태 로 실행됩니다. Kubernetes Operator는 이 하이브리드 상태 활성 마이그레이션 중에 일시적인 조건으로만 지원합니다. 마이그레이션을 수행하려면 해당 기간 동안 두 환경 간에 영구적인 양방향 네트워크 연결이 필요합니다. Kubernetes Operator는 분할 환경 배포서버 무기한 실행 지원 하지 않습니다.
마이그레이션이 수행하지 않는 작업
Kubernetes Operator는 다음을 수행하지 않습니다.
가상 머신을 해제합니다. 마이그레이션 완료된 후 직접 폐기합니다.
마이그레이션 을 롤백합니다. 마이그레이션이 시작된 후에는 마이그레이션 되돌릴 수 있는 자동화된 방법은 없습니다.
데이터를 시드 또는 사전 복사합니다. 모든 데이터 이동은 MongoDB 복제 통해 이루어집니다.
Migrate Ops Manager or Cloud Manager itself. Only the MongoDB deployment moves into Kubernetes.