Apply a SourceProvider .yaml to create a migration source.
When you apply a Migration .yaml to create a migration resource, you must specify the name of the SourceProvider in the Migration .yaml.
See Adding a migration source for examples on creating a SourceProvider .yaml for different migration sources.
The SourceProvider .yaml has the following format:
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
Migrating from Compute Engine
You must create a service account with the necessary permissions. See Creating a service account for using Compute Engine as a migration source for more.
You then create the secret using the command:
kubectl create secret generic secret-name -n v2k-system --from-file=cloud-platform-service-account-key=path-to-json-key-file