4.7. 卸载 MTC 并删除资源
您可以卸载 MTC,并删除其资源来清理集群。
注意
删除 velero
CRD 会从集群中移除 Velero。
先决条件
-
您必须以具有
cluster-admin
权限的用户身份登录。
流程
删除所有集群中的
MigrationController
自定义资源 (CR):$ oc delete migrationcontroller <migration_controller>
- 使用 Operator Lifecycle Manager 在 OpenShift Container Platform 4 上卸载 MTC Operator。
运行以下命令,删除所有集群中的集群范围资源:
migration
自定义资源定义 (CRDs):$ oc delete $(oc get crds -o name | grep 'migration.openshift.io')
Velero
CRD:$ oc delete $(oc get crds -o name | grep 'velero')
migration
集群角色:$ oc delete $(oc get clusterroles -o name | grep 'migration.openshift.io')
migration-operator
集群角色:$ oc delete clusterrole migration-operator
velero
集群角色:$ oc delete $(oc get clusterroles -o name | grep 'velero')
migration
集群角色绑定:$ oc delete $(oc get clusterrolebindings -o name | grep 'migration.openshift.io')
migration-operator
集群角色绑定:$ oc delete clusterrolebindings migration-operator
velero
集群角色绑定:$ oc delete $(oc get clusterrolebindings -o name | grep 'velero')