|
| 1 | +// Module included in the following assemblies: |
| 2 | +// |
| 3 | +// * migrating_from_ocp_3_to_4/troubleshooting-3-4.adoc |
| 4 | +// * migration_toolkit_for_containers/troubleshooting-mtc |
| 5 | + |
| 6 | +[id="migration-uninstalling-mtc-clean-up_{context}"] |
| 7 | += Uninstalling {mtc-short} and deleting resources |
| 8 | + |
| 9 | +You can uninstall the {mtc-full} ({mtc-short}) and delete its resources to clean up the cluster. |
| 10 | + |
| 11 | +[NOTE] |
| 12 | +==== |
| 13 | +Deleting the `velero` CRDs removes Velero from the cluster. |
| 14 | +==== |
| 15 | + |
| 16 | +.Prerequisites |
| 17 | + |
| 18 | +* You must be logged in as a user with `cluster-admin` privileges. |
| 19 | + |
| 20 | +.Procedure |
| 21 | + |
| 22 | +. Delete the `MigrationController` custom resource (CR) on all clusters: |
| 23 | ++ |
| 24 | +[source,terminal] |
| 25 | +---- |
| 26 | +$ oc delete migrationcontroller <migration_controller> |
| 27 | +---- |
| 28 | + |
| 29 | +. Uninstall the {mtc-short} Operator on {product-title} 4 by using the {product-title} web console. |
| 30 | +ifdef::troubleshooting-3-4[] |
| 31 | +. Uninstall the {mtc-short} Operator on {product-title} 3 by deleting the `operator` CR manifest: |
| 32 | ++ |
| 33 | +[source,terminal] |
| 34 | +---- |
| 35 | +$ oc delete -f operator.yml |
| 36 | +---- |
| 37 | +endif::[] |
| 38 | + |
| 39 | +. Delete cluster-scoped resources on all clusters by running the following commands: |
| 40 | + |
| 41 | +* `migration` custom resource definitions (CRDs): |
| 42 | ++ |
| 43 | +[source,terminal] |
| 44 | +---- |
| 45 | +$ oc delete $(oc get crds -o name | grep 'migration.openshift.io') |
| 46 | +---- |
| 47 | + |
| 48 | +* `velero` CRDs: |
| 49 | ++ |
| 50 | +[source,terminal] |
| 51 | +---- |
| 52 | +$ oc delete $(oc get crds -o name | grep 'velero') |
| 53 | +---- |
| 54 | + |
| 55 | +* `migration` cluster roles: |
| 56 | ++ |
| 57 | +[source,terminal] |
| 58 | +---- |
| 59 | +$ oc delete $(oc get clusterroles -o name | grep 'migration.openshift.io') |
| 60 | +---- |
| 61 | + |
| 62 | +* `migration-operator` cluster role: |
| 63 | ++ |
| 64 | +[source,terminal] |
| 65 | +---- |
| 66 | +$ oc delete clusterrole migration-operator |
| 67 | +---- |
| 68 | + |
| 69 | +* `velero` cluster roles: |
| 70 | ++ |
| 71 | +[source,terminal] |
| 72 | +---- |
| 73 | +$ oc delete $(oc get clusterroles -o name | grep 'velero') |
| 74 | +---- |
| 75 | + |
| 76 | +* `migration` cluster role bindings: |
| 77 | ++ |
| 78 | +[source,terminal] |
| 79 | +---- |
| 80 | +$ oc delete $(oc get clusterrolebindings -o name | grep 'migration.openshift.io') |
| 81 | +---- |
| 82 | + |
| 83 | +* `migration-operator` cluster role bindings: |
| 84 | ++ |
| 85 | +[source,terminal] |
| 86 | +---- |
| 87 | +$ oc delete clusterrolebindings migration-operator |
| 88 | +---- |
| 89 | + |
| 90 | +* `velero` cluster role bindings: |
| 91 | ++ |
| 92 | +[source,terminal] |
| 93 | +---- |
| 94 | +$ oc delete $(oc get clusterrolebindings -o name | grep 'velero') |
| 95 | +---- |
0 commit comments