4.3. 연결된 동안 Kubernetes Operator용 다중 클러스터 엔진을 위한 에이전트 기반 클러스터 배포 준비
다중 클러스터 엔진 Operator, LSO(Local Storage Operator)에 필요한 매니페스트를 생성하고 에이전트 기반 OpenShift Container Platform 클러스터를 허브 클러스터로 배포합니다.
프로세스
<
assets_directory> 폴더에
생성합니다. 이 하위 폴더는 배포된 클러스터를 추가로 사용자 지정하기 위해 설치 중에 적용할 추가 매니페스트를 저장하는 데 사용됩니다. &openshift
라는 하위 폴더를lt;assets_directory
> 폴더에는install-config.yaml
및agent-config.yaml
파일을 포함한 모든 자산이 포함되어 있습니다.참고설치 프로그램에서 추가 매니페스트를 확인하지 않습니다.
다중 클러스터 엔진의 경우 다음 매니페스트를 생성하여 <
assets_directory>/openshift
폴더에 저장합니다.Example
mce_namespace.yaml
apiVersion: v1 kind: Namespace metadata: labels: openshift.io/cluster-monitoring: "true" name: multicluster-engine
Example
mce_operatorgroup.yaml
apiVersion: operators.coreos.com/v1 kind: OperatorGroup metadata: name: multicluster-engine-operatorgroup namespace: multicluster-engine spec: targetNamespaces: - multicluster-engine
Example
mce_subscription.yaml
apiVersion: operators.coreos.com/v1alpha1 kind: Subscription metadata: name: multicluster-engine namespace: multicluster-engine spec: channel: "stable-2.1" name: multicluster-engine source: redhat-operators sourceNamespace: openshift-marketplace
참고지원되는 설치 관리자(AI)를 사용하여 RHACM(Red Hat Advanced Cluster Management)을 사용하여 대규모로 DCU(Distributed Unit)를 설치할 수 있습니다. 이러한 분산 단위는 hub 클러스터에서 활성화되어야 합니다. AI 서비스에는 수동으로 생성되는 PV(영구 볼륨)가 필요합니다.
AI 서비스의 경우 다음 매니페스트를 생성하여 <
assets_directory>/openshift
폴더에 저장합니다.Example
lso_namespace.yaml
apiVersion: v1 kind: Namespace metadata: annotations: openshift.io/cluster-monitoring: "true" name: openshift-local-storage
Example
lso_operatorgroup.yaml
apiVersion: operators.coreos.com/v1 kind: OperatorGroup metadata: name: local-operator-group namespace: openshift-local-storage spec: targetNamespaces: - openshift-local-storage
Example
lso_subscription.yaml
apiVersion: operators.coreos.com/v1alpha1 kind: Subscription metadata: name: local-storage-operator namespace: openshift-local-storage spec: installPlanApproval: Automatic name: local-storage-operator source: redhat-operators sourceNamespace: openshift-marketplace
참고모든 매니페스트를 생성한 후 파일 시스템이 다음과 같이 표시되어야 합니다.
파일 시스템 예
<assets_directory> ├─ install-config.yaml ├─ agent-config.yaml └─ /openshift ├─ mce_namespace.yaml ├─ mce_operatorgroup.yaml ├─ mce_subscription.yaml ├─ lso_namespace.yaml ├─ lso_operatorgroup.yaml └─ lso_subscription.yaml
다음 명령을 실행하여 에이전트 ISO 이미지를 생성합니다.
$ openshift-install agent create image --dir <assets_directory>
- 이미지가 준비되면 대상 시스템을 부팅하고 설치가 완료될 때까지 기다립니다.
설치를 모니터링하려면 다음 명령을 실행합니다.
$ openshift-install agent wait-for install-complete --dir <assets_directory>
참고완전한 기능 허브 클러스터를 구성하려면 다음 매니페스트를 생성하고
$ oc apply -f <manifest-name> 명령을 실행하여 수동으로 적용해야 합니다
. 매니페스트 생성 순서가 중요하며 필요한 경우 대기 조건이 표시됩니다.AI 서비스에 필요한 PV의 경우 다음 매니페스트를 생성합니다.
apiVersion: local.storage.openshift.io/v1 kind: LocalVolume metadata: name: assisted-service namespace: openshift-local-storage spec: logLevel: Normal managementState: Managed storageClassDevices: - devicePaths: - /dev/vda - /dev/vdb storageClassName: assisted-service volumeMode: Filesystem
다음 명령을 사용하여 후속 매니페스트를 적용하기 전에 PV의 가용성을 기다립니다.
$ oc wait localvolume -n openshift-local-storage assisted-service --for condition=Available --timeout 10m
참고The `devicePath` is an example and may vary depending on the actual hardware configuration used.
다중 클러스터 엔진 인스턴스에 대한 매니페스트를 생성합니다.
Example
MultiClusterEngine.yaml
apiVersion: multicluster.openshift.io/v1 kind: MultiClusterEngine metadata: name: multiclusterengine spec: {}
AI 서비스를 활성화하는 매니페스트를 생성합니다.
agentserviceconfig.yaml
예apiVersion: agent-install.openshift.io/v1beta1 kind: AgentServiceConfig metadata: name: agent namespace: assisted-installer spec: databaseStorage: storageClassName: assisted-service accessModes: - ReadWriteOnce resources: requests: storage: 10Gi filesystemStorage: storageClassName: assisted-service accessModes: - ReadWriteOnce resources: requests: storage: 10Gi
나중에 대화하는 클러스터를 배포할 매니페스트를 생성합니다.
Example
clusterimageset.yaml
apiVersion: hive.openshift.io/v1 kind: ClusterImageSet metadata: name: "4.12" spec: releaseImage: quay.io/openshift-release-dev/ocp-release:4.12.0-x86_64
에이전트가 설치된 클러스터(Multicluster 엔진 및 지원 서비스를 호스트)를 hub 클러스터 클러스터로 가져오는 매니페스트를 생성합니다.
예:
autoimport.yaml
apiVersion: cluster.open-cluster-management.io/v1 kind: ManagedCluster metadata: labels: local-cluster: "true" cloud: auto-detect vendor: auto-detect name: local-cluster spec: hubAcceptsClient: true
관리 클러스터가 생성될 때까지 기다립니다.
$ oc wait -n multicluster-engine managedclusters local-cluster --for condition=ManagedClusterJoined=True --timeout 10m
검증
관리 클러스터 설치에 성공했는지 확인하려면 다음 명령을 실행합니다.
$ oc get managedcluster NAME HUB ACCEPTED MANAGED CLUSTER URLS JOINED AVAILABLE AGE local-cluster true https://<your cluster url>:6443 True True 77m
추가 리소스