6.2. 在 OpenShift Container Platform 3 上安装旧的 MTC Operator
您可以在 OpenShift Container Platform 3 上手动安装旧的 MTC Operator。
先决条件
-
必须使用在所有集群中具有
cluster-admin
权限的用户登录。 -
您必须有权访问
registry.redhat.io
。 -
必须安装
podman
。 - 您必须创建一个镜像流 secret,并将其复制到集群中的每个节点。
流程
使用您的红帽客户门户网站账户登陆到
registry.redhat.io
:$ sudo podman login registry.redhat.io
输入以下命令下载
operator.yml
文件:$ sudo podman cp $(sudo podman create \ registry.redhat.io/rhmtc/openshift-migration-legacy-rhel8-operator:v1.7):/operator.yml ./
输入以下命令下载
controller.yml
文件:$ sudo podman cp $(sudo podman create \ registry.redhat.io/rhmtc/openshift-migration-legacy-rhel8-operator:v1.7):/controller.yml ./
- 登录您的 OpenShift Container Platform 源集群。
验证集群可以在
registry.redhat.io
中进行身份验证:$ oc run test --image registry.redhat.io/ubi8 --command sleep infinity
创建 MTC Operator 对象的 Migration Toolkit:
$ oc create -f operator.yml
输出示例
namespace/openshift-migration created rolebinding.rbac.authorization.k8s.io/system:deployers created serviceaccount/migration-operator created customresourcedefinition.apiextensions.k8s.io/migrationcontrollers.migration.openshift.io created role.rbac.authorization.k8s.io/migration-operator created rolebinding.rbac.authorization.k8s.io/migration-operator created clusterrolebinding.rbac.authorization.k8s.io/migration-operator created deployment.apps/migration-operator created Error from server (AlreadyExists): error when creating "./operator.yml": rolebindings.rbac.authorization.k8s.io "system:image-builders" already exists 1 Error from server (AlreadyExists): error when creating "./operator.yml": rolebindings.rbac.authorization.k8s.io "system:image-pullers" already exists
- 1
- 您可以忽略
Error from server (AlreadyExists)
信息。它们是由 MTC Operator 为早期版本的 OpenShift Container Platform 4 创建资源造成的,这些资源在以后的版本中已提供。
创建
MigrationController
对象:$ oc create -f controller.yml
验证 MTC Pod 是否正在运行:
$ oc get pods -n openshift-migration