10.4. vSphere에서 클러스터에 대해 여러 호스트 그룹 지정


VMware vSphere 인스턴스에서 실행되는 OpenShift Container Platform 클러스터에 대해 여러 호스트 그룹을 지정하기 위해 infrastructures.config.openshift.io 구성 리소스를 구성할 수 있습니다. vSphere 인스턴스가 확장된 클러스터 구성에 있고 ESXi 호스트와 스토리지가 여러 개의 물리적 데이터 센터에 분산되어 있는 경우 이 작업이 필요합니다. 설치 시 OpenShift Container Platform 클러스터에 대한 호스트 그룹을 아직 구성하지 않은 경우 또는 추가 호스트 그룹으로 OpenShift Container Platform 클러스터를 업데이트해야 하는 경우 이 절차를 사용하세요.

중요

vSphere 호스트 그룹에 대한 OpenShift 영역 지원은 Technology Preview 기능에만 해당됩니다. 기술 프리뷰 기능은 Red Hat 프로덕션 서비스 수준 계약(SLA)에서 지원되지 않으며 기능적으로 완전하지 않을 수 있습니다. 따라서 프로덕션 환경에서 사용하는 것은 권장하지 않습니다. 이러한 기능을 사용하면 향후 제품 기능을 조기에 이용할 수 있어 개발 과정에서 고객이 기능을 테스트하고 피드백을 제공할 수 있습니다.

Red Hat 기술 프리뷰 기능의 지원 범위에 대한 자세한 내용은 기술 프리뷰 기능 지원 범위를 참조하십시오.

사전 요구 사항

  • ESXi 호스트는 호스트 그룹으로 그룹화되며, 이 호스트 그룹은 VM-호스트 친화성 규칙을 통해 해당 가상 머신(VM) 그룹에 연결됩니다. 자세한 내용은 다음 govc 명령 예를 참조하세요.

    # This example shows the correct configuration for a cluster with two host groups:
    
    # Create host groups:
    govc cluster.group.create -name <host_group_1> -host
    govc cluster.group.create -name <host_group_2> -host
    
    # Create VM groups:
    govc cluster.group.create -name <vm_group_1> -vm
    govc cluster.group.create -name <vm_group_2> -vm
    
    # Create VM-host affinity rules:
    govc cluster.rule.create -name <rule_1> -enable -vm-host -vm-group <vm_group_1> -host-affine-group <host_group_1>
    govc cluster.rule.create -name <rule_2> -enable -vm-host -vm-group <vm_group_2> -host-affine-group <host_group_2>
    
    # Add ESXi hosts to host groups:
    govc cluster.group.change -name <host_group_1> <esxi_host_1_ip>
    govc cluster.group.change -name <host_group_2> <esxi_host_2_ip>
    Copy to Clipboard Toggle word wrap
  • openshift-regionopenshift-zone 태그 범주는 vCenter 서버에서 생성됩니다.
  • 컴퓨팅 클러스터에는 openshift-region 태그 카테고리의 태그가 있습니다.
  • 호스트 그룹 내의 ESXi 호스트에는 openshift-zone 태그 범주의 태그가 있습니다.
  • vSphere vCenter 클러스터 개체에 Host.Inventory.EditCluster 권한이 부여됩니다.
  • TechPreviewNoUpgrade 기능 세트가 활성화되었습니다. 자세한 내용은 "기능 게이트를 사용하여 기능 활성화"를 참조하십시오.

프로세스

  1. OpenShift Container Platform 클러스터의 인프라 설정을 편집합니다.

    1. 기존 인프라 설정을 파일에 복사하려면 다음 명령을 실행하세요.

      $ oc get infrastructures.config.openshift.io cluster -o yaml > <name_of_infrastructure_file>.yaml
      Copy to Clipboard Toggle word wrap
    2. vSphere 클러스터의 각 호스트 그룹에 대한 장애 도메인을 포함하도록 인프라 파일을 편집합니다. 이 구성의 예는 다음 YAML 파일을 참조하세요. 각괄호( < > )로 묶인 값을 사용자의 값으로 바꿔야 합니다.

      apiVersion: config.openshift.io/v1
      kind: Infrastructure
      metadata:
        name: cluster
      spec:
        cloudConfig:
          key: config
          name: cloud-provider-config
        platformSpec:
          type: VSphere
          vsphere:
            apiServerInternalIPs:
            - <internal_ip_of_api_server>
            failureDomains:
            - name: <unique_name_for_failure_domain_1>
              region: <cluster_1_region_tag>
              server: <vcenter_server_ip_address>
              zoneAffinity:
                type: HostGroup
                hostGroup:
                  vmGroup: <name_of_vm_group_1>
                  hostGroup: <name_of_host_group_1>
                  vmHostRule: <name_of_vm_host_affinity_rule_1>
              regionAffinity:
                type: ComputeCluster
              topology:
                computeCluster: /<data_center_1>/host/<cluster_1>
                datacenter: <data_center_1>
                datastore: /<data_center_1>/datastore/<datastore_1>
                networks:
                - VM Network
                resourcePool: /<data_center_1>/host/<cluster_1>/Resources
                template: /<data_center_1>/vm/<vm_template>
              zone: <host_group_1_tag>
            - name: <unique_name_for_failure_domain_2>
              region: <cluster_1_region_tag>
              server: <vcenter_server_ip_address>
              zoneAffinity:
                type: HostGroup
                hostGroup:
                  vmGroup: <name_of_vm_group_2>
                  hostGroup: <name_of_host_group_2>
                  vmHostRule: <name_of_vm_host_affinity_rule_2>
              regionAffinity:
                type: ComputeCluster
              topology:
                computeCluster: /<data_center_1>/host/<cluster_1>
                datacenter: <data_center_1>
                datastore: /<data_center_1>/datastore/<datastore_1>
                networks:
                - VM Network
                resourcePool: /<data_center_1>/host/<cluster_1>/Resources
                template: /<data_center_1>/vm/<vm_template>
              zone: <host_group_2_tag>
      # ...
      Copy to Clipboard Toggle word wrap
    3. 이러한 변경 사항으로 클러스터를 업데이트하려면 다음 명령을 실행하세요.

      $ oc replace -f <name_of_infrastructure_file>.yaml
      Copy to Clipboard Toggle word wrap
  2. 다음 단계를 완료하여 새 오류 도메인으로 ControlPlaneMachineSet 사용자 지정 리소스(CR)를 업데이트하세요.

    1. 다음 명령을 실행하여 ControlPlaneMachineSet CR을 편집합니다.

      $ oc edit controlplanemachinesets.machine.openshift.io -n openshift-machine-api cluster
      Copy to Clipboard Toggle word wrap
    2. 다음 예와 같이 failureDomains 매개변수를 편집합니다.

      spec:
        replicas: 3
        selector:
          matchLabels:
            machine.openshift.io/cluster-api-cluster: jdoe3-whb8l
            machine.openshift.io/cluster-api-machine-role: master
            machine.openshift.io/cluster-api-machine-type: master
        state: Active
        strategy:
          type: RollingUpdate
        template:
          machineType: machines_v1beta1_machine_openshift_io
          machines_v1beta1_machine_openshift_io:
            failureDomains:
              platform: VSphere
              vsphere:
              - name: <failure_domain_1_name>
              - name: <failure_domain_2_name>
      # ...
      Copy to Clipboard Toggle word wrap
    3. 계속 진행하기 전에 제어 평면 노드의 업데이트가 완료되었는지 확인하세요. 이렇게 하려면 다음 명령을 실행하세요.

      $ oc get controlplanemachinesets.machine.openshift.io -n openshift-machine-api
      Copy to Clipboard Toggle word wrap
  3. 실패 도메인에 대한 새로운 MachineSet CR을 만듭니다.

    1. 템플릿으로 사용할 기존 MachineSet CR의 구성을 검색하려면 다음 명령을 실행하세요.

      $ oc get machinesets.machine.openshift.io -n openshift-machine-api <existing_machine_set> -o yaml > machineset-<failure_domain_name>.yaml
      Copy to Clipboard Toggle word wrap
    2. 인프라 파일에서 정의한 각 장애 도메인에 대한 MachineSet CR 파일을 생성하기 위해 필요에 따라 템플릿을 복사합니다. 다음 예를 참조하세요.

      apiVersion: machine.openshift.io/v1beta1
      kind: MachineSet
      metadata:
        labels:
          machine.openshift.io/cluster-api-cluster: <infrastructure_id>
        name: <machineset_name>
        namespace: openshift-machine-api
      spec:
        replicas: 0
        selector:
          matchLabels:
            machine.openshift.io/cluster-api-cluster: <infrastructure_id>
            machine.openshift.io/cluster-api-machineset: <machineset_name>
        template:
          metadata:
            labels:
              machine.openshift.io/cluster-api-cluster: <infrastructure_id>
              machine.openshift.io/cluster-api-machine-role: worker
              machine.openshift.io/cluster-api-machine-type: worker
              machine.openshift.io/cluster-api-machineset: <machineset_name>
          spec:
            lifecycleHooks: {}
            metadata: {}
            providerSpec:
              value:
                apiVersion: machine.openshift.io/v1beta1
                credentialsSecret:
                  name: vsphere-cloud-credentials
                diskGiB: <disk_GiB>
                kind: VSphereMachineProviderSpec
                memoryMiB: <memory_in_MiB>
                metadata:
                  creationTimestamp: null
                network:
                  devices:
                  - networkName: VM Network
                numCPUs: <number_of_cpus>
                numCoresPerSocket: <number_of_cores_per_socket>
                snapshot: ""
                template: <template_name>
                userDataSecret:
                  name: worker-user-data
                workspace:
                  datacenter: <data_center_1>
                  datastore: /<data_center_1>/datastore/<datastore_1>
                  folder: /<data_center_1>/vm/<folder>
                  resourcePool: /<data_center_1>/host/<cluster_1>/Resources
                  server: <server_ip_address>
                  vmGroup: <name_of_vm_group_1>
      # ...
      Copy to Clipboard Toggle word wrap
    3. MachineSet CR 파일에 대해 다음 명령을 실행합니다.

      $ oc create -f <name_of_machine_set_file>.yaml
      Copy to Clipboard Toggle word wrap
맨 위로 이동
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

Theme

© 2025 Red Hat