5.3.3.2. HyperConverged object node placement rule example


To specify the nodes where OpenShift Virtualization deploys its components, you can edit the nodePlacement object in the HyperConverged custom resource (CR) file that you create during OpenShift Virtualization installation.

Example HyperConverged object with nodeSelector rule:

apiVersion: hco.kubevirt.io/v1
kind: HyperConverged
metadata:
  name: kubevirt-hyperconverged
  namespace: openshift-cnv
spec:
  deployment:
    nodePlacements:
      infra:
        nodeSelector:
          example.io/example-infra-key: example-infra-value
      workload:
        nodeSelector:
          example.io/example-workloads-key: example-workloads-value
  • Infrastructure resources are placed on nodes labeled example.io/example-infra-key = example-infra-value.
  • Workloads are placed on nodes labeled example.io/example-workloads-key = example-workloads-value.

Example HyperConverged object with affinity rule:

apiVersion: hco.kubevirt.io/v1
kind: HyperConverged
metadata:
  name: kubevirt-hyperconverged
  namespace: openshift-cnv
spec:
  deployment:
    nodePlacements:
      infra:
        affinity:
          nodeAffinity:
            requiredDuringSchedulingIgnoredDuringExecution:
              nodeSelectorTerms:
              - matchExpressions:
                - key: example.io/example-infra-key
                  operator: In
                  values:
                  - example-infra-value
      workload:
        affinity:
          nodeAffinity:
            requiredDuringSchedulingIgnoredDuringExecution:
              nodeSelectorTerms:
              - matchExpressions:
                - key: example.io/example-workloads-key
                  operator: In
                  values:
                  - example-workloads-value
            preferredDuringSchedulingIgnoredDuringExecution:
            - weight: 1
              preference:
                matchExpressions:
                - key: example.io/num-cpus
                  operator: Gt
                  values:
                  - 8
  • Infrastructure resources are placed on nodes labeled example.io/example-infra-key = example-value.
  • Workloads are placed on nodes labeled example.io/example-workloads-key = example-workloads-value.
  • Nodes that have more than eight CPUs are preferred for workloads, but if they are not available, pods are still scheduled.

Example HyperConverged object with tolerations rule:

apiVersion: hco.kubevirt.io/v1
kind: HyperConverged
metadata:
  name: kubevirt-hyperconverged
  namespace: openshift-cnv
spec:
  deployment:
    nodePlacements:
      workload:
        tolerations:
        - key: "key"
          operator: "Equal"
          value: "virtualization"
          effect: "NoSchedule"

Nodes reserved for OpenShift Virtualization components are labeled with the key = virtualization:NoSchedule taint. Only pods with matching tolerations are scheduled on reserved nodes.

The following pods are affected by the HyperConverged object node placement rules. These pods are created when an HyperConverged CR is deployed:

  • cdi-apiserver
  • cdi-deployment
  • cdi-uploadproxy
  • kubemacpool-cert-manager
  • kubemacpool-mac-controller-manager
  • kubevirt-apiserver-proxy
  • kubevirt-console-plugin
  • kubevirt-ipam-controller-manager
  • kubevirt-migration-controller
  • virt-api
  • virt-controller
  • virt-exportproxy
  • virt-template-validator
Red Hat logoGithubRedditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 소개

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

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

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

Red Hat 문서 정보

Legal Notice

Theme

© 2026 Red Hat
맨 위로 이동