Skip to content

KubeVirt Hosted Control Plane Deployment#

Follow these steps to set up a k0smotron-hosted control plane on KubeVirt.

  1. Prerequisites

    Before you start, make sure you have the following:

    • A management Kubernetes cluster (Kubernetes v1.28+) with k0rdent installed.
    • A KubeVirt Infrastructure Cluster deployed and configured. See KubeVirt Infrastructure Cluster Preparation for setup instructions.
    • Network connectivity between the management cluster and the KubeVirt Infrastructure Cluster.
    • A default storage class configured on the management cluster to support PersistentVolumes.
    • A Service LoadBalancer solution deployed on the management cluster to provide LoadBalancer Services for the hosted control plane that will be accessed from the KubeVirt Infrastructure Cluster.

    Important

    All control plane components for your hosted cluster run in the management cluster. The management cluster must have sufficient resources to handle these additional workloads.

  2. Prepare the management cluster

    Follow the Prepare Management Cluster: KubeVirt guide to create a KubeVirt Credential object and a resource-template ConfigMap in the namespace where the cluster will be deployed.

  3. Create the ClusterDeployment manifest

    The ClusterDeployment manifest for KubeVirt-hosted control planes is similar to manifests for standalone control plane deployments. For a detailed list of parameters available in the k0rdent built-in kubevirt-hosted-cp template, refer to the schema at Parameters for KubeVirt Hosted ClusterTemplate.

    For example:

    apiVersion: k0rdent.mirantis.com/v1beta1
    kind: ClusterDeployment
    metadata:
      name: cluster-1
    spec:
      template: kubevirt-hosted-cp-1-0-1
      credential: kubevirt-credential
      config:
        clusterLabels: {}
        clusterAnnotations: {}
        controlPlaneNumber: 1
        workersNumber: 1
        cluster:
          controlPlaneServiceTemplate:
            spec:
              type: ClusterIP
        worker:
          dnsConfig:
            nameservers:
            - 8.8.8.8
          cpu:
            model: host-passthrough
    

    For other KubeVirt cluster templates, the available parameters differ. Refer to the corresponding template reference guides for details.