SourceProvider CRD

SourceProvider .yaml을 적용하여 마이그레이션 소스를 만듭니다.

Migration .yaml을 적용하여 마이그레이션 리소스를 만들 때 Migration .yaml에서 SourceProvider의 이름을 지정해야 합니다.

다른 마이그레이션 소스에 대한 SourceProvider .yaml 생성 방법에 대한 예시는 마이그레이션 소스 추가를 참조하세요.

SourceProvider .yaml의 형식은 다음과 같습니다.

apiVersion: anthos-migrate.cloud.google.com/v1beta2
kind: SourceProvider
metadata:
  name: migration-source-name
spec:

 <--- For migrate from Compute Engine --->
  gce:
    project: project-name
    <-- See below for more on this service account. --->
    serviceAccount:
      secretRef:
        name: secret-name
        namespace: v2k-system

 <--- For migrate from AWS/Azure/VMware --->
  migrateForCE:
    management:
      address: manager-ip-address
      cloudDetails:
        platform: aws | azure | vmware
        name: Name of the source, as configured in Migrate for Compute Engine
      cloudExtension: ID or name of the Migrate for Anthos extension
      password:
        <-- Password for your Migrate for Compute Engine management server. --->
        secretRef:
          name: secret-name
          namespace: v2k-system

 <--- For migrations on Anthos clusters on VMware --->
  localVmware:
    address: vCenter-DNS-or-IP
     < -- The username for a user that has permission to access the vCenter. --->
    username: username
    password:
      secretRef:
        < -- The password for the user that has permission to access the vCenter. --->
        name: secret-name
        namespace: v2k-system

 <--- For migration on Anthos clusters on AWS --->
  localAws:
    region: aws-region
     < -- The username for a user that has permission to access AWS. --->
    accessKeyId: access-key-id
    secretAccessKey:
      secretRef:
        < -- The password for the user that has permission to access AWS. --->
        name: secret-name
        namespace: v2k-system

Compute Engine에서 마이그레이션

필요한 권한이 있는 서비스 계정을 만들어야 합니다. 자세한 내용은 Compute Engine을 마이그레이션 소스로 사용할 서비스 계정 만들기를 참조하세요.

이후 다음 명령어를 사용하여 보안 비밀을 만듭니다.

kubectl create secret generic secret-name -n v2k-system --from-file=cloud-platform-service-account-key=path-to-json-key-file