1.4.2.6. 제한된 환경에서 OpenShift Container Platform 3 소스 클러스터에 Migration Toolkit for Containers 설치
MTC(Migration Toolkit for Containers) Operator 이미지를 기반으로 매니페스트 파일을 만들고 로컬 이미지 레지스트리를 가리키도록 매니페스트를 편집할 수 있습니다. 그런 다음 로컬 이미지를 사용하여 OpenShift Container Platform 3 소스 클러스터에서 Migration Toolkit for Containers Operator를 생성할 수 있습니다.
OpenShift Container Platform 3 및 4 클러스터에 동일한 MTC 버전을 설치해야 합니다.
OpenShift Container Platform 3 클러스터에 최신 버전이 있는지 확인하려면 마이그레이션 계획을 생성하고 실행할 준비가 되었을 때 operator.yml
및 controller-3.yml
파일을 다운로드합니다.
사전 요구 사항
-
모든 클러스터에서
cluster-admin
권한이 있는 사용자로 로그인합니다. -
registry.redhat.io
에 대한 액세스 권한이 있어야 합니다. -
podman
이 설치되어 있어야 합니다. - 소스 클러스터는 OpenShift Container Platform 3.7, 3.9, 3.10 또는 3.11이어야 합니다.
- 무제한 네트워크 액세스 권한이 있는 Linux 워크스테이션이 있어야 합니다.
- Docker v2-2를 지원하는 미러 레지스트리에 액세스할 수 있어야 합니다.
절차
무제한 네트워크 액세스가 가능한 워크스테이션에서 Red Hat Customer Portal 자격 증명을 사용하여
registry.redhat.io
에 로그인합니다.$ sudo podman login registry.redhat.io
operator.yml
파일을 다운로드합니다.$ sudo podman cp $(sudo podman create \ registry.redhat.io/rhmtc/openshift-migration-rhel7-operator:v1.4):/operator.yml ./
controller-3.yml
파일을 다운로드합니다.$ sudo podman cp $(sudo podman create \ registry.redhat.io/rhmtc/openshift-migration-rhel7-operator:v1.4):/controller-3.yml ./
OpenShift Container Platform 4 클러스터에서
oc adm catalog mirror
를 실행할 때 작성된mapping.txt
파일에서 Operator 이미지 값을 확보합니다.$ grep openshift-migration-rhel7-operator ./mapping.txt | grep rhmtc
출력은
registry.redhat.io
이미지와 미러 레지스트리 이미지 간의 매핑을 보여줍니다.출력 예
registry.redhat.io/rhmtc/openshift-migration-rhel7-operator@sha256:468a6126f73b1ee12085ca53a312d1f96ef5a2ca03442bcb63724af5e2614e8a=<registry.apps.example.com>/rhmtc/openshift-migration-rhel7-operator
Operator 구성 파일에서
image
및REGISTRY
값을 업데이트합니다.containers: - name: ansible image: <registry.apps.example.com>/rhmtc/openshift-migration-rhel7-operator@sha256:<468a6126f73b1ee12085ca53a312d1f96ef5a2ca03442bcb63724af5e2614e8a> 1 ... - name: operator image: <registry.apps.example.com>/rhmtc/openshift-migration-rhel7-operator@sha256:<468a6126f73b1ee12085ca53a312d1f96ef5a2ca03442bcb63724af5e2614e8a> 2 ... env: - name: REGISTRY value: <registry.apps.example.com> 3
- OpenShift Container Platform 3 클러스터에 로그인합니다.
Migration Toolkit for Containers Operator 오브젝트 생성:
$ 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)
메시지를 무시할 수 있습니다. 이 메시지는 Migration Toolkit for Containers Operator가 이후 릴리스에서 제공되는 OpenShift Container Platform 3 이전 버전용 리소스를 생성하기 때문에 발생합니다.
MigrationController
오브젝트를 만듭니다.$ oc create -f controller-3.yml
Velero
및Restic
Pod가 실행 중인지 확인합니다.$ oc get pods -n openshift-migration