You can upgrade the Migration Toolkit for Containers (MTC) by installing the latest MTC Operator.

Upgrading the MTC Operator on an OKD 4 cluster

You can upgrade to MTC 1.3 on an OKD 4 cluster by uninstalling the CAM Operator and installing the MTC Operator.

Procedure
  1. In the OKD console, navigate to Operators > Installed Operators.

  2. Click CAM Operator.

  3. On the right side of the Operator Details page, select Uninstall Operator from the Actions list.

  4. Select Uninstall. This Operator stops running and no longer receives updates.

  5. Navigate to OperatorsOperatorHub.

  6. Use the Filter by keyword field to find the MTC Operator.

  7. Select the MTC Operator and click Install.

  8. On the Install Operator page, click Install.

    On the Installed Operators page, verify that the MTC Operator appears in the openshift-migration project with the status Succeeded.

Upgrading the MTC Operator on an OKD 3 cluster

You can upgrade MTC on an OKD 3 cluster by downloading the latest operator.yml file and replacing the existing MTC Operator.

If you remove and recreate the namespace, you must update the cluster’s service account token in the MTC web console.

Procedure
  1. Log in to registry.redhat.io with your Red Hat Customer Portal credentials:

    $ sudo podman login registry.redhat.io
  2. Download the latest operator.yml file:

    $ sudo podman cp $(sudo podman create registry.redhat.io/rhmtc/openshift-migration-rhel7-operator:v1.3.0):/operator.yml ./
  3. Replace the MTC Operator:

    $ oc replace --force -f operator.yml
  4. If you are upgrading from version 1.1.2 or earlier, delete the Restic Pod to apply the changes:

    1. Get the Restic Pod name:

      $ oc get pod -n openshift-migration | grep restic
    2. Delete the Restic Pod or Pods:

      $ oc delete pod <restic_pod>
  5. If you are upgrading from version 1.2 or later, scale the migration-operator deployment to apply the changes:

    1. Scale the migration-operator deployment to 0:

      $ oc scale -n openshift-migration --replicas=0 deployment/migration-operator
    2. Scale the migration-operator deployment to 1 to apply the changes:

      $ oc scale -n openshift-migration --replicas=1 deployment/migration-operator
  6. Verify that the operator was upgraded to the latest version:

    $ oc -o yaml -n openshift-migration get deployment/migration-operator | grep image: | awk -F ":" '{ print $NF }'