$ oc delete migrationcontroller -n openshift-migration migration-controller
You can upgrade the Migration Toolkit for Containers (MTC) by installing the latest Migration Toolkit for Containers Operator.
You can upgrade to Migration Toolkit for Containers (MTC) 1.3 on an OKD 4 cluster by deleting the MigrationController
custom resource (CR), uninstalling the CAM Operator, and then installing the Migration Toolkit for Containers Operator.
Delete the MigrationController
CR:
$ oc delete migrationcontroller -n openshift-migration migration-controller
In the OKD console, navigate to Operators > Installed Operators.
Click CAM Operator.
On the right side of the Operator Details page, select Uninstall Operator from the Actions list.
Select Uninstall. This Operator stops running and no longer receives updates.
Navigate to Operators → OperatorHub.
Use the Filter by keyword field to find the Migration Toolkit for Containers Operator.
Select the Migration Toolkit for Containers Operator and click Install.
On the Install Operator page, click Install.
On the Installed Operators page, verify that the Migration Toolkit for Containers Operator appears in the openshift-migration project with the status Succeeded.
You can upgrade Migration Toolkit for Containers (MTC) on an OKD 3 cluster by downloading the latest operator.yml
file and replacing the existing Migration Toolkit for Containers Operator.
If you remove and recreate the namespace, you must update the cluster service account token in the MTC web console. |
Log in to registry.redhat.io
with your Red Hat Customer Portal credentials:
$ sudo podman login registry.redhat.io
Download the latest operator.yml
file:
$ sudo podman cp $(sudo podman create registry.redhat.io/rhmtc/openshift-migration-rhel7-operator:v1.3.2):/operator.yml ./
Replace the Migration Toolkit for Containers Operator:
$ oc replace --force -f operator.yml
If you are upgrading from version 1.1.2 or earlier, delete the Restic
pod to apply the changes:
Get the Restic
pod names:
$ oc get pod -n openshift-migration | grep restic
Delete each Restic
Pod:
$ oc delete pod <restic_pod>
If you are upgrading from version 1.2 or later, scale the migration-operator
deployment to 0
to stop the deployment:
$ oc scale -n openshift-migration --replicas=0 deployment/migration-operator
Scale the migration-operator
deployment to 1
to start the deployment and apply the changes:
$ oc scale -n openshift-migration --replicas=1 deployment/migration-operator
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 }'