KubeVirt Hosted Control Plane Deployment#
Follow these steps to set up a k0smotron-hosted control plane on KubeVirt.
-
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
LoadBalancerServices 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.
-
Prepare the management cluster
Follow the Prepare Management Cluster: KubeVirt guide to create a KubeVirt
Credentialobject and a resource-templateConfigMapin the namespace where the cluster will be deployed. -
Create the
ClusterDeploymentmanifestThe
ClusterDeploymentmanifest 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-inkubevirt-hosted-cptemplate, 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-passthroughFor other KubeVirt cluster templates, the available parameters differ. Refer to the corresponding template reference guides for details.