SourceProvider CRD

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.

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 to Compute Engine 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 on-prem migration --->
  localVmware:
    address: vCenter-DNS-or-IP
     < -- The credentials for a user that has permission to access the vCenter. --->
    username: username
    password:
      secretRef: 
        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=gcp-sa=path-to-json-key-file