이 콘텐츠는 선택한 언어로 제공되지 않습니다.

Chapter 4. Post-installation configuration


4.1. Postinstallation configuration

After you have installed OpenShift Virtualization, there are procedures that you can complete to ensure that your environment is properly set up. You can configure the components that are relevant for your environment.

  • The hostpath provisioner is a local storage provisioner designed for OpenShift Virtualization. If you want to configure local storage for virtual machines, you must enable the hostpath provisioner first.
  • Node placement rules for OpenShift Virtualization Operators, workloads, and controllers.
  • Network configuration:

    • Enabling the creation of load balancer services by using the OpenShift Dedicated web console
  • Storage configuration:

    • Defining a default storage class for the Container Storage Interface (CSI)
    • Configuring local storage by using the Hostpath Provisioner (HPP)

4.2. Specifying nodes for OpenShift Virtualization components

You can configure node placement rules to specify where OpenShift Virtualization Operators, workloads, and controllers are deployed. Custom placement rules allow you to isolate virtual machine (VM) traffic or dedicate specialized compute resources to critical workloads.

Important

You can configure node placement rules for some components after installing OpenShift Virtualization, but virtual machines cannot be present if you want to configure node placement rules for workloads.

4.2.1. About node placement rules for OpenShift Virtualization components

You can use node placement rules to deploy virtual machines only on nodes intended for virtualization workloads, to deploy Operators only on infrastructure nodes, or to maintain separation between workloads.

Depending on the object, you can use one or more of the following rule types:

nodeSelector
Allows pods to be scheduled on nodes that are labeled with the key-value pair or pairs that you specify in this field. The node must have labels that exactly match all listed pairs.
affinity
Enables you to use more expressive syntax to set rules that match nodes with pods. Affinity also allows for more nuance in how the rules are applied. For example, you can specify that a rule is a preference, not a requirement. If a rule is a preference, pods are still scheduled when the rule is not satisfied.
tolerations
Allows pods to be scheduled on nodes that have matching taints. If a taint is applied to a node, that node only accepts pods that tolerate the taint.

4.2.2. Applying node placement rules

You can apply node placement rules to ensure that virtualization components run on the most suitable nodes for your workload requirements. You can apply node placement rules by editing OpenShift Virtualization objects.

Prerequisites

  • You have installed the OpenShift CLI (oc).
  • You are logged in with cluster administrator permissions.

Procedure

  1. Edit the object in your default editor by running the following command:

    $ oc edit <resource_type> <resource_name> -n openshift-cnv
  2. Save the file to apply the changes.

4.2.3. Node placement rule examples

Examples of node placement rules for different objects that determine where OpenShift Virtualization components are deployed.

4.2.3.1. 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/v1beta1
kind: HyperConverged
metadata:
  name: kubevirt-hyperconverged
  namespace: openshift-cnv
spec:
  infra:
    nodePlacement:
      nodeSelector:
        example.io/example-infra-key: example-infra-value
  workloads:
    nodePlacement:
      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/v1beta1
kind: HyperConverged
metadata:
  name: kubevirt-hyperconverged
  namespace: openshift-cnv
spec:
  infra:
    nodePlacement:
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
            - matchExpressions:
              - key: example.io/example-infra-key
                operator: In
                values:
                - example-infra-value
  workloads:
    nodePlacement:
      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/v1beta1
kind: HyperConverged
metadata:
  name: kubevirt-hyperconverged
  namespace: openshift-cnv
spec:
  workloads:
    nodePlacement:
      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.

4.2.3.2. HostPathProvisioner object node placement rule example

You can edit the HostPathProvisioner object directly or by using the web console.

Warning

You must schedule the hostpath provisioner (HPP) and the OpenShift Virtualization components on the same nodes. Otherwise, virtualization pods that use the hostpath provisioner cannot run. You cannot run virtual machines.

After you deploy a virtual machine (VM) with the HPP storage class, you can remove the hostpath provisioner pod from the same node by using the node selector. However, you must first revert that change, at least for that specific node, and wait for the pod to run before trying to delete the VM.

You can configure node placement rules by specifying nodeSelector, affinity, or tolerations for the spec.workload field of the HostPathProvisioner object that you create when you install the hostpath provisioner.

Example HostPathProvisioner object with nodeSelector rule:

apiVersion: hostpathprovisioner.kubevirt.io/v1beta1
kind: HostPathProvisioner
metadata:
  name: hostpath-provisioner
spec:
  imagePullPolicy: IfNotPresent
  pathConfig:
    path: "</path/to/backing/directory>"
    useNamingPrefix: false
  workload:
    nodeSelector:
      example.io/example-workloads-key: example-workloads-value

Workloads are placed on nodes labeled example.io/example-workloads-key = example-workloads-value.

4.3. Postinstallation network configuration

By default, OpenShift Virtualization uses a single internal pod network after installation.

4.3.1. Creating a Linux bridge NNCP

After you install the Kubernetes NMState Operator, you can configure a Linux bridge network for live migration or external access to virtual machines (VMs).

You can create a NodeNetworkConfigurationPolicy (NNCP) manifest for a Linux bridge network.

Prerequisites

  • You have installed the Kubernetes NMState Operator.

Procedure

  • Create the NodeNetworkConfigurationPolicy manifest. This example includes sample values that you must replace with your own information.

    apiVersion: nmstate.io/v1
    kind: NodeNetworkConfigurationPolicy
    metadata:
      name: br1-eth1-policy
    spec:
      desiredState:
        interfaces:
          - name: br1
            description: Linux bridge with eth1 as a port
            type: linux-bridge
            state: up
            ipv4:
              enabled: false
            bridge:
              options:
                stp:
                  enabled: false
              port:
                - name: eth1
    • metadata.name defines the name of the node network configuration policy.
    • spec.desiredState.interfaces.name defines the name of the new Linux bridge.
    • spec.desiredState.interfaces.description is an optional field that can be used to define a human-readable description for the bridge.
    • spec.desiredState.interfaces.type defines the interface type. In this example, the type is a Linux bridge.
    • spec.desiredState.interfaces.state defines the requested state for the interface after creation.
    • spec.desiredState.interfaces.ipv4.enabled defines whether the ipv4 protocol is active. Setting this to false disables IPv4 addressing on this bridge.
    • spec.desiredState.interfaces.bridge.options.stp.enabled defines whether Spanning Tree Protocol (STP) is active. Setting this to false disables STP on this bridge.
    • spec.desiredState.interfaces.bridge.port.name defines the node NIC that the bridge is attached to.

4.3.2. Creating a Linux bridge NAD by using the web console

Use the OpenShift Dedicated web console to create a network attachment definition (NAD) that connects pods and virtual machines to a layer-2 network.

Warning

Configuring IP address management (IPAM) in a network attachment definition for virtual machines is not supported.

Procedure

  1. In the web console, click Networking NetworkAttachmentDefinitions.
  2. Click Create Network Attachment Definition.

    Note

    The network attachment definition must be in the same namespace as the pod or virtual machine.

  3. Enter a unique Name and optional Description.
  4. Select CNV Linux bridge from the Network Type list.
  5. Enter the name of the bridge in the Bridge Name field.
  6. Optional: If the resource has VLAN IDs configured, enter the ID numbers in the VLAN Tag Number field.
  7. Optional: Select MAC Spoof Check to enable MAC spoof filtering. This feature provides security against a MAC spoofing attack by allowing only a single MAC address to exit the pod.
  8. Optional: In the YAML tab, add the spec.config.disableContainerInterface field. When set to true, the Bridge CNI plug-in skips creating a standard container virtual ethernet (veth) interface inside the pod’s network namespace. This enables the virtualization networking backend to attach the layer-2 interface directly to the guest VM instead of a standard container.

    Example YAML:

    apiVersion: "k8s.cni.cncf.io/v1"
    kind: NetworkAttachmentDefinition
    metadata:
      name: bridge-network
      annotations:
        k8s.v1.cni.cncf.io/resourceName: bridge.network.kubevirt.io/br1
    spec:
      config: |
        {
    # ...
          "disableContainerInterface": true,
    # ...
        }
  9. Click Create.

4.3.3. Configuring a dedicated secondary network for live migration

After you have configured a Linux bridge network, you can configure a dedicated network for live migration. A dedicated network minimizes the effects of network saturation on tenant workloads during live migration.

To configure a dedicated secondary network for live migration, you must first create a bridge network attachment definition (NAD) by using the CLI. You can then add the name of the NetworkAttachmentDefinition object to the HyperConverged custom resource (CR).

Prerequisites

  • You installed the OpenShift CLI (oc).
  • You logged in to the cluster as a user with the cluster-admin role.
  • Each node has at least two Network Interface Cards (NICs).
  • The NICs for live migration are connected to the same VLAN.

Procedure

  1. Create a NetworkAttachmentDefinition manifest according to the following example:

    apiVersion: "k8s.cni.cncf.io/v1"
    kind: NetworkAttachmentDefinition
    metadata:
      name: my-secondary-network
      namespace: openshift-cnv
    spec:
      config: '{
        "cniVersion": "0.3.1",
        "name": "migration-bridge",
        "type": "macvlan",
        "master": "eth1",
        "mode": "bridge",
        "ipam": {
          "type": "whereabouts",
          "range": "10.200.5.0/24"
        }
      }'
    • metadata.name defines the name of the NetworkAttachmentDefinition object.
    • config.master defines the name of the NIC to be used for live migration.
    • config.type defines the name of the CNI plugin that provides the network for the NAD.
    • config.range defines an IP address range for the secondary network. This range must not overlap the IP addresses of the main network.
  2. Open the HyperConverged CR in your default editor by running the following command:

    $ oc edit hyperconvergeds.v1beta1.hco.kubevirt.io kubevirt-hyperconverged -n openshift-cnv
  3. Add the name of the NetworkAttachmentDefinition object to the spec.liveMigrationConfig stanza of the HyperConverged CR.

    Example HyperConverged manifest:

    apiVersion: hco.kubevirt.io/v1beta1
    kind: HyperConverged
    metadata:
      name: kubevirt-hyperconverged
      namespace: openshift-cnv
    spec:
      liveMigrationConfig:
        completionTimeoutPerGiB: 800
        network: <network>
        parallelMigrationsPerCluster: 5
        parallelOutboundMigrationsPerNode: 2
        progressTimeout: 150
    # ...
    • spec.liveMigrationConfig.network defines the name of the Multus NetworkAttachmentDefinition object to be used for live migrations.
  4. Save your changes and exit the editor. The virt-handler pods restart and connect to the secondary network.

Verification

  • When the node that the virtual machine runs on is placed into maintenance mode, the VM automatically migrates to another node in the cluster. You can verify that the migration occurred over the secondary network and not the default pod network by checking the target IP address in the virtual machine instance (VMI) metadata.

    $ oc get vmi <vmi_name> -o jsonpath='{.status.migrationState.targetNodeAddress}'

4.3.4. Selecting a dedicated network by using the web console

You can select a dedicated network for live migration by using the OpenShift Dedicated web console.

Prerequisites

  • You configured a Multus network for live migration.
  • You created a network attachment definition for the network.

Procedure

  1. Go to Virtualization Settings in the OpenShift Dedicated web console.
  2. On the Cluster tab, click General settiings.
  3. Click Live Migration.
  4. Select the network from the Live migration network list.

4.3.5. Enabling load balancer service creation by using the web console

You can enable the creation of load balancer services for a virtual machine (VM) by using the OpenShift Dedicated web console.

Prerequisites

  • You have configured a load balancer for the cluster.
  • You have logged in as a user with the cluster-admin role.
  • You created a network attachment definition for the network.

Procedure

  1. Go to Virtualization Settings.
  2. Click Cluster.
  3. Expand General settings and SSH configuration.
  4. Set SSH over LoadBalancer service to on.

4.3.6. Configuring additional routes to the cdi-uploadproxy service

As a cluster administrator, you can configure additional routes to the cdi-uploadproxy service, enabling users to upload virtual machine images from outside the cluster.

Prerequisites

  • You installed the OpenShift CLI (oc).
  • You logged in to the cluster as a user with the cluster-admin role.

Procedure

  1. Configure the route to the external host by running the following command:

    $ oc create route reencrypt <route_name> -n openshift-cnv \
        --insecure-policy=Redirect \
        --hostname=<host_name_or_address> \
        --service=cdi-uploadproxy

    where:

    <route_name>
    Specifies the name to assign to this custom route.
    <host_name_or_address>
    Specifies the fully qualified domain name or IP address of the external host providing image upload access.
  2. Run the following command to annotate the route. This ensures that the correct Containerized Data Importer (CDI) CA certificate is injected when certificates are rotated:

    $ oc annotate route <route_name> -n openshift-cnv \
        operator.cdi.kubevirt.io/injectUploadProxyCert="true"

    where:

    <route_name>
    Specifies the name of the route you created.

4.4. Postinstallation storage configuration

If your storage provider is not recognized by the Containerized Data Importer (CDI), you must configure storage profiles after you install OpenShift Virtualization. Storage profiles provide recommended storage settings based on the associated storage class.

Optional: You can configure local storage by using the hostpath provisioner (HPP).

See the "Storage configuration overview" documentation for more options, including configuring the CDI, data volumes, and automatic boot source updates.

4.4.1. Configuring local storage by using the HPP

When you install the OpenShift Virtualization Operator, the Hostpath Provisioner (HPP) Operator is automatically installed. The HPP Operator creates the HPP provisioner.

The HPP is a local storage provisioner designed for OpenShift Virtualization. To use the HPP, you must create an HPP custom resource (CR).

Important

HPP storage pools must not be in the same partition as the operating system. Otherwise, the storage pools might fill the operating system partition. If the operating system partition is full, this might negatively impact performance, or the node can become unstable or unusable.

4.4.1.1. Creating a storage class for the CSI driver with the storagePools stanza

To use the hostpath provisioner (HPP) you must create an associated storage class for the Container Storage Interface (CSI) driver.

When you create a storage class, you set parameters that affect the dynamic provisioning of persistent volumes (PVs) that belong to that storage class. You cannot update a StorageClass object’s parameters after you create it.

Prerequisites

  • Install the OpenShift CLI (oc).
  • Log in as a user with cluster-admin privileges.

Procedure

  1. Create a storageclass_csi.yaml file to define the storage class:

    apiVersion: storage.k8s.io/v1
    kind: StorageClass
    metadata:
      name: hostpath-csi
    provisioner: kubevirt.io.hostpath-provisioner
    reclaimPolicy: Delete
    volumeBindingMode: WaitForFirstConsumer
    parameters:
      storagePool: my-storage-pool
    • reclaimPolicy defines whether the underlying storage is deleted or retained when a user deletes a PVC. The two possible reclaimPolicy values are Delete and Retain. If you do not specify a value, the default value is Delete.
    • volumeBindingMode defines the timing of PV creation. In this example, the WaitForFirstConsumer configuration delays PV creation until the scheduler assigns a pod to a specific node.

      Note

      Virtual machines use data volumes based on local PVs, which reside on specific nodes. When the system prepares a disk image for the virtual machine, the scheduler might not place the virtual machine on the node where it pinned the local storage PV.

      + To solve this problem, use the Kubernetes pod scheduler to bind the persistent volume claim (PVC) to a PV on the correct node. Setting the volumeBindingMode parameter of the StorageClass to WaitForFirstConsumer delays PV binding and provisioning until you create a pod that uses the PVC.

    • parameters.storagePool defines the name of the storage pool defined in the HPP custom resource (CR).
  2. Save the file and exit.
  3. Create the StorageClass object by running the following command:

    $ oc create -f storageclass_csi.yaml

4.5. Virtual machine recovery from node failures

To ensure that virtual machines (VMs) recover automatically when a node fails, configure node health checks, automated remediation, and capacity planning. These recommendations come from chaos testing results and help minimize VM downtime during node failure conditions.

4.5.2. Configuring node health checks for virtual machines

You can configure the Node Health Check Operator to monitor node status and trigger automated remediation when a node becomes unhealthy.

Prerequisites

  • You have installed the Node Health Check Operator.
  • You have installed a remediation operator.
  • You have cluster administrator privileges.

Procedure

  1. Create a NodeHealthCheck custom resource (CR) to define the health check criteria and remediation strategy:

    apiVersion: remediation.medik8s.io/v1alpha1
    kind: NodeHealthCheck
    metadata:
      name: nodehealthcheck-sample
    spec:
      minHealthy: <count>
      pauseRequests:
        - <pause_test_cluster>
      remediationTemplate:
        apiVersion: self-node-remediation.medik8s.io/v1alpha1
        name: self-node-remediation-automatic-strategy-template
        namespace: openshift-workload-availability
        kind: SelfNodeRemediationTemplate
      escalatingRemediations:
        - remediationTemplate:
            apiVersion: self-node-remediation.medik8s.io/v1alpha1
            name: self-node-remediation-resource-deletion-template
            namespace: openshift-workload-availability
            kind: SelfNodeRemediationTemplate
          order: 1
          timeout: 300s
      selector:
        matchExpressions:
          - key: node-role.kubernetes.io/worker
            operator: Exists
      unhealthyConditions:
        - type: Ready
          status: "False"
          duration: 30s
        - type: Ready
          status: Unknown
          duration: 30s

    where:

    • spec.minHealthy defines the number of worker nodes required to host VMs that migrate from failed nodes.

      • For critical environments, set this value to the minimum number of nodes that you require to maintain the cluster workload.
      • For hyperconverged storage, set this value to one less than your number of nodes to limit remediation to a single worker-node failure and maintain storage stability.
    • spec.remediationTemplate defines the remediation template to use when the Node Health Check Operator detects an unhealthy node. This example uses the Self Node Remediation Operator.
    • spec.escalatingRemediations defines escalating remediation strategies. If the initial remediation does not resolve the issue within the specified timeout, the next remediation strategy runs.
    • spec.selector defines the nodes to monitor. This example monitors all worker nodes.
    • spec.unhealthyConditions defines the parameters to identify an unhealthy node.
    • spec.unhealthyConditions.duration defines the duration that a condition must persist before remediation starts. Set lower values for faster recovery. The following table shows recommended values:

      Expand
      Table 4.1. Recommended unhealthyConditions duration values
      EnvironmentRecommended duration

      Critical

      30-60 seconds

      Standard

      60-180 seconds

      Conservative

      180-360 seconds

  2. Apply the NodeHealthCheck CR by running the following command:

    $ oc apply -f nodehealthcheck-sample.yaml

Verification

  • Verify that the NodeHealthCheck CR exists by running the following command:

    $ oc get nodehealthcheck nodehealthcheck-sample
Tip

If remediation does not trigger as expected, verify that the remediation Operator runs correctly, and check the NodeHealthCheck CR events for errors:

$ oc describe nodehealthcheck nodehealthcheck-sample

4.5.3. Node remediation strategies for OpenShift Virtualization

Use the best remediation strategy for your environment to ensure that virtual machine (VM) workloads recover automatically when nodes become unhealthy.

Self Node Remediation (SNR) and Fence Agents Remediation (FAR) are the recommended remediation Operators for OpenShift Virtualization environments. Recovery time depends on the number of VMs on the failed nodes.

Self Node Remediation (SNR)
Use for nodes that do not have a management interface, or when the management interface might be unreachable. SNR does not require a management interface to function. Do not use SNR for hyperconverged storage because API unavailability can cause remediation actions that negatively impact hyperconverged storage protection domains.
Fence Agents Remediation (FAR)

The fastest remediation Operator for workload recovery time. Use FAR when a baseboard management controller (BMC) interface is available. FAR requires a management interface that is reachable from the Kubernetes pod network.

You must use FAR for hyperconverged storage configurations. For hyperconverged storage, set the Node Health Check minHealthy property to your total node count minus one. With this setting, FAR does not remediate more than a single worker-node failure within the same zone, storage placement, and replication group to maintain storage stability.

Note
  • Remediation actions start after the node conditions monitored by the Node Health Check Operator exceed the time specified in spec.unhealthyConditions[].duration.
  • Disruption to the node running the self-node-remediation-controller-manager pod increases recovery times.

4.5.3.1. Self Node Remediation configuration parameters

You can tune the Self Node Remediation (SNR) Operator configuration to optimize recovery times and ensure availability of VM workloads.

SelfNodeRemediationTemplate strategies

The SelfNodeRemediationTemplate custom resource (CR) defines the remediation strategy to use when the Node Health Check Operator identifies a node as unhealthy. Configure the remediation strategy in a SelfNodeRemediationTemplate CR:

apiVersion: self-node-remediation.medik8s.io/v1alpha1
kind: SelfNodeRemediationTemplate
metadata:
  name: self-node-remediation-resource-deletion-template
  namespace: openshift-operators
spec:
  template:
    spec:
      remediationStrategy: ResourceDeletion

where:

  • spec.remediationStrategy defines the remediation strategy. Use ResourceDeletion to delete pods and associated volume attachments on the unhealthy node. Use OutOfServiceTaint to place an out-of-service taint on the unhealthy node and delete pods and associated volume attachments. This strategy is faster than ResourceDeletion.
SelfNodeRemediationConfig parameters

The SelfNodeRemediationConfig CR defines the timing and connectivity parameters for the SNR Operator. Tuning these parameters based on your environment conditions helps ensure availability of workloads and prevents unnecessary remediation actions. Configure the timing and connectivity parameters in a SelfNodeRemediationConfig CR:

apiVersion: self-node-remediation.medik8s.io/v1alpha1
kind: SelfNodeRemediationConfig
metadata:
  name: self-node-remediation-config
  namespace: openshift-operators
spec:
  safeTimeToAssumeNodeRebootedSeconds: 180
  watchdogFilePath: /dev/watchdog
  isSoftwareRebootEnabled: true
  apiServerTimeout: 15s
  apiCheckInterval: 5s
  maxApiErrorThreshold: 3
  peerApiServerTimeout: 5s
  peerDialTimeout: 5s
  peerRequestTimeout: 5s
  peerUpdateInterval: 15m

where:

  • spec.safeTimeToAssumeNodeRebootedSeconds defines the time in seconds to wait before assuming the node has rebooted. Set this value to the node reboot time plus 20% for faster recovery, or plus 40% for a more conservative approach.

4.5.4. Capacity planning for VM failover

Plan node capacity to ensure your cluster has enough resources to host VMs that migrate from failed nodes.

When a node fails and you have enabled remediation, VMs automatically migrate to other available nodes in the cluster. Monitor the following resources on your cluster to ensure adequate capacity for VM failover:

  • VM count per node
  • Available CPU
  • Available memory
  • Available disk
  • Available network bandwidth

Check the current resource use of your nodes:

$ oc adm top nodes
Note

The number of VMs that a node can host depends on the maxPods value set in the kubelet configuration:

kubeletConfig:
  maxPods: 250

4.6. Configuring certificate rotation

Configure certificate rotation parameters to replace existing certificates.

4.6.1. Configuring certificate rotation

You can do this during OpenShift Virtualization installation in the web console or after installation in the HyperConverged custom resource (CR).

Prerequisites

  • You have installed the OpenShift CLI (oc).

Procedure

  1. Open the HyperConverged CR by running the following command:

    $ oc edit hyperconvergeds.v1beta1.hco.kubevirt.io kubevirt-hyperconverged -n openshift-cnv
  2. Edit the spec.certConfig fields as shown in the following example. To avoid overloading the system, ensure that all values are greater than or equal to 10 minutes. Express all values as strings that comply with the golang ParseDuration format.

    apiVersion: hco.kubevirt.io/v1beta1
    kind: HyperConverged
    metadata:
      name: kubevirt-hyperconverged
      namespace: openshift-cnv
    spec:
      certConfig:
        ca:
          duration: 48h0m0s
          renewBefore: 24h0m0s
        server:
          duration: 24h0m0s
          renewBefore: 12h0m0s
    • The value of ca.renewBefore must be less than or equal to the value of ca.duration.
    • The value of server.duration must be less than or equal to the value of ca.duration.
    • The value of server.renewBefore must be less than or equal to the value of server.duration.
  3. Apply updates to the HyperConverged CR by running the following command:

    $ oc apply -f <filename>.yaml

    For example:

    $ oc apply -f kubevirt-hyperconverged.yaml

4.6.2. Troubleshooting certificate rotation parameters

Deleting one or more certConfig values in the HyperConverged custom resource (CR) causes the certConfig values to revert to the default values.

If the default values conflict with one of the following conditions, you receive an error message instead:

  • The value of ca.renewBefore must be less than or equal to the value of ca.duration.
  • The value of server.duration must be less than or equal to the value of ca.duration.
  • The value of server.renewBefore must be less than or equal to the value of server.duration.

For example, if you remove the server.duration value, the default value of 24h0m0s is greater than the value of ca.duration, which conflicts with the specified conditions:

apiVersion: hco.kubevirt.io/v1beta1
kind: HyperConverged
metadata:
  name: kubevirt-hyperconverged
  namespace: openshift-cnv
spec:
  # ...
  certConfig:
    ca:
      duration: 4h0m0s
      renewBefore: 1h0m0s
    server:
      duration: 4h0m0s
      renewBefore: 4h0m0s
# ...

This results in the following error message:

error: hyperconvergeds.hco.kubevirt.io "kubevirt-hyperconverged" could not be patched: admission webhook "validate-hco.kubevirt.io" denied the request: spec.certConfig: ca.duration is smaller than server.duration

The error message only mentions the first conflict. Review all certConfig values before you proceed.

Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 소개

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

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

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

Red Hat 문서 정보

Legal Notice

Theme

© 2026 Red Hat
맨 위로 이동