Upgrading the Migration Toolkit for Containers
You can upgrade MTC on OKD versions 3.7 to 3.11 by installing the legacy Migration Toolkit for Containers Operator.
You can upgrade the Migration Toolkit for Containers (MTC) on OKD 4.8 by using the Operator Lifecycle Manager.
Prerequisites
- You must be logged in as a user with
cluster-admin
privileges.
Procedure
In the OKD console, navigate to Operators → Installed Operators.
Operators that have a pending upgrade display an Upgrade available status.
Click Migration Toolkit for Containers Operator.
Click the Subscription tab. Any upgrades requiring approval are displayed next to Upgrade Status. For example, it might display 1 requires approval.
Click 1 requires approval, then click Preview Install Plan.
Review the resources that are listed as available for upgrade and click Approve.
Navigate back to the Operators → Installed Operators page to monitor the progress of the upgrade. When complete, the status changes to Succeeded and Up to date.
Click Migration Toolkit for Containers Operator.
Under Provided APIs, locate the Migration Controller tile, and click Create Instance.
Click Workloads → Pods to verify that the MTC pods are running.
Prerequisites
You must be logged in as a user with
cluster-admin
privileges.You must have access to
registry.redhat.io
.You must have
podman
installed.
Procedure
Log in to
registry.redhat.io
with your Red Hat Customer Portal credentials:Download the
operator.yml
file for your OKD 3 version:OKD version 3.9 to 3.11:
$ sudo podman cp $(sudo podman create \
registry.redhat.io/rhmtc/openshift-migration-legacy-rhel8-operator:v1.5.1):/operator.yml ./
Replace the Migration Toolkit for Containers Operator:
$ oc replace --force -f <operator.yml>
Scale the
migration-operator
deployment to0
to stop the deployment:$ oc scale -n openshift-migration --replicas=0 deployment/migration-operator
Scale the
migration-operator
deployment to to start the deployment and apply the changes:Verify that the
migration-operator
was upgraded:$ oc -o yaml -n openshift-migration get deployment/migration-operator | grep image: | awk -F ":" '{ print $NF }'
Download the
controller.yml
file:$ sudo podman cp $(sudo podman create \
registry.redhat.io/rhmtc/openshift-migration-legacy-rhel8-operator:v1.5.1):/controller.yml ./
Create the
migration-controller
object:$ oc create -f controller.yml
-
If you have previously added the OKD 3 cluster to the MTC web console, you must update the service account token in the web console because the upgrade process deletes and restores the
openshift-migration
namespace:Obtain the service account token:
In the MTC web console, click Clusters.
Click the Options menu next to the cluster and select Edit.
Enter the new service account token in the Service account token field.
Click Update cluster and then click Close.
Verify that the MTC pods are running:
$ oc get pods -n openshift-migration
If you are upgrading Migration Toolkit for Containers (MTC) version 1.3.x to 1.6, you must update the MigPlan
custom resource (CR) manifest on the cluster on which the MigrationController
pod is running.
Because the indirectImageMigration
and parameters do not exist in MTC 1.3, their default value in version 1.4 is false
, which means that direct image migration and direct volume migration are enabled. Because the direct migration requirements are not fulfilled, the migration plan cannot reach a Ready
state unless these parameter values are changed to true
.
Prerequisites
- You must be logged in as a user with
cluster-admin
privileges.
Procedure
Log in to the cluster on which the
MigrationController
pod is running.Get the
MigPlan
CR manifest:$ oc get migplan <migplan> -o yaml -n openshift-migration
Update the following parameter values and save the file as
migplan.yaml
:...
spec:
indirectImageMigration: true
indirectVolumeMigration: true
Replace the
MigPlan
CR manifest to apply the changes: