4.2. 연결이 끊긴 동안 Kubernetes Operator용 다중 클러스터 엔진을 위한 에이전트 기반 클러스터 배포 준비
연결이 끊긴 환경의 필요한 OpenShift Container Platform 컨테이너 이미지, 다중 클러스터 엔진 Operator 및 LSO(Local Storage Operator)를 로컬 미러 레지스트리에 미러링할 수 있습니다. 미러 레지스트리의 로컬 DNS 호스트 이름과 포트를 기록해야 합니다.
OpenShift Container Platform 이미지 저장소를 미러 레지스트리에 미러링하려면 oc adm release image
또는 oc mirror
명령을 사용할 수 있습니다. 이 절차에서는 oc mirror
명령이 예제로 사용됩니다.
프로세스
-
유효한
install-config.yaml
및agent-config.yaml
파일을 포함할 <assets_directory
> 폴더를 생성합니다. 이 디렉터리는 모든 자산을 저장하는 데 사용됩니다. OpenShift Container Platform 이미지 리포지토리, 다중 클러스터 엔진 및 LSO를 미러링하려면 다음 설정으로
ImageSetConfiguration.yaml
파일을 생성합니다.Example
ImageSetConfiguration.yaml
kind: ImageSetConfiguration apiVersion: mirror.openshift.io/v1alpha2 archiveSize: 4 1 storageConfig: 2 imageURL: <your-local-registry-dns-name>:<your-local-registry-port>/mirror/oc-mirror-metadata 3 skipTLS: true mirror: platform: architectures: - "amd64" channels: - name: stable-4.12 4 type: ocp additionalImages: - name: registry.redhat.io/ubi8/ubi:latest operators: - catalog: registry.redhat.io/redhat/redhat-operator-index:v4.12 5 packages: 6 - name: multicluster-engine 7 - name: local-storage-operator 8
- 1
- 이미지 세트 내의 각 파일의 최대 크기(GiB)를 지정합니다.
- 2
- 이미지 세트 메타데이터를 수신할 백엔드 위치를 설정합니다. 이 위치는 레지스트리 또는 로컬 디렉터리일 수 있습니다. 기술 프리뷰 OCI 기능을 사용하지 않는 한
storageConfig
값을 지정해야 합니다. - 3
- 스토리지 백엔드의 레지스트리 URL을 설정합니다.
- 4
- 설치 중인 버전의 OpenShift Container Platform 이미지가 포함된 채널을 설정합니다.
- 5
- 설치 중인 OpenShift Container Platform 이미지가 포함된 Operator 카탈로그를 설정합니다.
- 6
- 이미지 세트에 포함할 특정 Operator 패키지 및 채널만 지정합니다. 이 필드를 제거하여 카탈로그의 모든 패키지를 검색합니다.
- 7
- 멀티 클러스터 엔진 패키지 및 채널.
- 8
- LSO 패키지 및 채널
참고이 파일은 콘텐츠를 미러링할 때
oc mirror
명령에 필요합니다.특정 OpenShift Container Platform 이미지 저장소, 다중 클러스터 엔진 및 LSO를 미러링하려면 다음 명령을 실행합니다.
$ oc mirror --dest-skip-tls --config ocp-mce-imageset.yaml docker://<your-local-registry-dns-name>:<your-local-registry-port>
install-config.yaml
파일에서 레지스트리 및 인증서를 업데이트합니다.Example
imageContentSources.yaml
imageContentSources: - source: "quay.io/openshift-release-dev/ocp-release" mirrors: - "<your-local-registry-dns-name>:<your-local-registry-port>/openshift/release-images" - source: "quay.io/openshift-release-dev/ocp-v4.0-art-dev" mirrors: - "<your-local-registry-dns-name>:<your-local-registry-port>/openshift/release" - source: "registry.redhat.io/ubi8" mirrors: - "<your-local-registry-dns-name>:<your-local-registry-port>/ubi8" - source: "registry.redhat.io/multicluster-engine" mirrors: - "<your-local-registry-dns-name>:<your-local-registry-port>/multicluster-engine" - source: "registry.redhat.io/rhel8" mirrors: - "<your-local-registry-dns-name>:<your-local-registry-port>/rhel8" - source: "registry.redhat.io/redhat" mirrors: - "<your-local-registry-dns-name>:<your-local-registry-port>/redhat"
또한
install-config.yaml
의additionalTrustBundle
필드에 인증서가 있는지 확인합니다.예:
install-config.yaml
additionalTrustBundle: | -----BEGIN CERTIFICATE----- zzzzzzzzzzz -----END CERTIFICATE-------
중요oc mirror
명령은 여러 출력을 사용하여oc-mirror-workspace
라는 폴더를 생성합니다. 여기에는 OpenShift Container Platform 및 선택한 Operator에 필요한 모든 미러를 식별하는imageContentSourcePolicy.yaml
파일이 포함됩니다.다음 명령을 실행하여 클러스터 매니페스트를 생성합니다.
$ openshift-install agent create cluster-manifests
이 명령은 미러 구성이 포함된
미러
폴더를 포함하도록 클러스터 매니페스트 폴더를 업데이트합니다.