Harvester Architecture on Kubernetes and KubeVirt
local graph
Chapter 2: Harvester Architecture On Kubernetes And KubeVirt
Section titled “Chapter 2: Harvester Architecture On Kubernetes And KubeVirt”If you want to run Harvester with confidence, you need a clear mental model of what actually runs on each node and how those parts behave when something fails. Harvester is not a single binary sitting on a server, it is a composition of a minimal operating system, a Kubernetes distribution, a virtualization layer built on KVM, and a distributed storage engine, all wrapped in a coherent user experience. The design is opinionated. It keeps the host operating system as lean as possible, it expects Kubernetes to act as the control plane for virtual machines as well as containers, and it treats storage as a cloud native service provided by Longhorn volumes rather than traditional SANs.
Understanding this architecture is not about memorizing product names. It is about knowing where state lives, which processes are on the critical path, and which layers you can inspect and control with standard Kubernetes tools. When you break the platform down into SLE Micro and Elemental on the host, RKE2 as the orchestrator, KubeVirt as the virtualization engine, and Longhorn as the storage layer, Harvester becomes much easier to reason about.
The sections that follow walk through these building blocks, how the control plane is constructed around etcd, how Harvester exposes its functionality through custom resources and APIs, and how a single virtual machine definition eventually becomes one or more pods on a specific node through KubeVirt. Once you can trace that path, both deployment and troubleshooting feel far less mysterious.
2.1: Core Building Blocks SLE Micro, Elemental, RKE2, KubeVirt And Longhorn
Section titled “2.1: Core Building Blocks SLE Micro, Elemental, RKE2, KubeVirt And Longhorn”Harvester is built on a stack that SUSE has been refining through its edge and cloud native offerings. At the base sits SUSE Linux Enterprise Micro, often referred to as SLE Micro. This is a minimal, container focused operating system that is designed for Kubernetes nodes. It favors an image based lifecycle rather than individual package changes, which reduces configuration drift and keeps the host environment predictable. Elemental surrounds SLE Micro with a management layer that lets you provision, upgrade, and reinstall nodes declaratively from Kubernetes itself.
On a Harvester node, SLE Micro provides the kernel, system services, and container runtime that RKE2 uses to run the Kubernetes control plane and data plane components. Elemental is responsible for getting that SLE Micro image onto the node, registering the node with the cluster, and keeping the OS version in sync with what your platform team has declared as the desired state. That means that when you upgrade Harvester, you are really upgrading a combination of OS images, Kubernetes components, and Harvester specific controllers in one coordinated operation, not patching each node manually.
RKE2 is the Kubernetes distribution that Harvester uses. RKE2 is SUSE’s hardened Kubernetes, with sensible defaults for production, standard upstream APIs, and a packaging model that fits nicely with SLE Micro. In a Harvester cluster, RKE2 runs the usual control plane components such as the API server, controller manager, scheduler, and etcd, along with worker node components like kubelet and kube proxy. Harvester specific controllers and webhooks run as pods on top of RKE2 and extend the API with custom resources that represent virtual machines, images, networks, volumes, and configuration.
KubeVirt is the layer that turns Kubernetes into a virtualization platform. Instead of treating VMs as something outside Kubernetes, KubeVirt runs the user space parts of the Linux virtualization stack inside Kubernetes pods. It relies on KVM and libvirt on the host, but presents all control through Kubernetes resources. You define a VirtualMachine object, KubeVirt translates that into a VirtualMachineInstance and then into a pod that runs a special virt launcher container plus the VM process. This approach keeps the host focused on providing KVM support while allowing Kubernetes to manage scheduling, lifecycle, and high availability for VMs using the same patterns it uses for pods in general.
Longhorn completes the base stack by providing distributed block storage. Longhorn runs as a set of controllers and engine pods on the cluster. It aggregates local disks from the nodes, slices them into volumes, and replicates data across multiple nodes. Each volume is composed of one controller plus multiple replicas, which gives resilience against node failures. Longhorn volumes are presented to workloads, including KubeVirt VMs, as block devices, and they can be snapshotted, backed up to NFS or S3 compatible targets, and restored across clusters. Longhorn was developed by Rancher Labs and is now a CNCF project, and SUSE uses it as the storage layer for Harvester as well as other edge offerings.
Within this architecture, Harvester adds several important pieces. It introduces a user interface that understands virtualization concepts and acts as a front end to the underlying CRDs for VMs, images, networks, and volumes. It also includes additional controllers that coordinate host lifecycle, management node promotion, backup and restore of VMs, PCI passthrough configuration, and integration with Rancher. From an administrator perspective, though, it is helpful to keep the mental picture simple. A node runs SLE Micro, which is installed and updated by Elemental. On that base, RKE2 runs the Kubernetes control plane and orchestration. KubeVirt uses KVM to run VMs in pods, and Longhorn uses local disks to provide replicated volumes that back both VMs and container workloads. Harvester orchestrates these layers and provides a virtualization centric interface and API.
You rarely modify SLE Micro directly on a Harvester node. Configuration changes are typically expressed as Kubernetes resources that Elemental and Harvester interpret, or as Harvester settings that the platform applies cluster wide. For example, when you set up a VM migration network or configure a backup target, you interact with the Harvester interface or its API, which results in Kubernetes resources and Longhorn configuration changes. The operating system remains an appliance like base, upgraded as part of the overall cluster lifecycle rather than being treated as a general purpose Linux distribution.
To make these relationships concrete, it is useful to look at a simplified view of a node through the resources that describe it in Kubernetes. Harvester labels nodes to reflect their roles, and SLE Micro is referenced in the node annotations that record OS information. The following example is shortened but illustrates how these layers appear when inspected with kubectl.
apiVersion: v1kind: Nodemetadata: name: harv-node1 labels: node.harvesterhci.io/role: management kubernetes.io/hostname: harv-node1 kubernetes.io/os: linux node.kubernetes.io/instance-type: sle-micro annotations: harvesterhci.io/os-version: "SLE Micro 5.5" elemental.cattle.io/machine-id: "c9b7a3d5-82e2-4dd9-9b1a-123456789abc"spec: taints: - key: node-role.kubernetes.io/control-plane effect: NoSchedulestatus: nodeInfo: kubeProxyVersion: v1.30.3+rke2r1 kubeletVersion: v1.30.3+rke2r1 operatingSystem: linux osImage: "SUSE Linux Enterprise Micro 5.5"In a production cluster the labels and annotations are more extensive, but this view captures the essential idea. The OS is SLE Micro, managed by Elemental, and the Kubernetes components are provided by RKE2. Harvester layers virtualization specific roles on top of that foundation.
2.2: Control Plane, etcd Quorum And Failure Domains
Section titled “2.2: Control Plane, etcd Quorum And Failure Domains”The control plane for a Harvester cluster is the Kubernetes control plane provided by RKE2, with Harvester specific controllers added. At the center of that control plane sits etcd, the distributed key value store that holds all cluster state. This includes the definitions of virtual machines, Longhorn volumes, network configurations, and Harvester settings, as well as the usual Kubernetes objects such as pods, services, and deployments. Harvester documentation states clearly that the maximum node fault tolerance depends on etcd quorum, and that a three node management cluster can tolerate only one management node failure.
In a typical Harvester deployment, the first node you install becomes a management node. Subsequent nodes join as compute nodes, and once there are enough nodes, Harvester promotes additional management nodes to form a highly available control plane. Current documentation explains that when three or more nodes are present, the first two that joined after the initial node are promoted to management nodes, creating a three node control plane.
This pattern follows standard etcd practices. Etcd clusters require an odd number of members and rely on majority quorum to commit changes. In a three member etcd cluster, you can lose one member and still have quorum, but losing two members causes the cluster to stop processing writes. Documentation and operations guides across Kubernetes distributions reinforce this rule. Harvester simply inherits it through its use of RKE2 and etcd.
From a failure domain perspective, this means that management nodes are critical. When you design a Harvester cluster, you must treat management nodes as the control plane failure domain and ensure that their underlying hardware, power, and network connectivity are at least as robust as anything you would provide for a standalone Kubernetes control plane. Node roles in Harvester can include management, compute, and witness. A witness node is a special control plane node introduced to add quorum in smaller clusters without running workloads there. It participates in etcd but does not host user workloads, which can be useful in certain topologies such as dual site clusters where you want an additional control plane voter in a third location.
Because all Harvester objects ultimately live in Kubernetes and etcd, control plane health directly affects virtualization operations. If etcd is under stress, you may see delays in VM lifecycle operations, Longhorn volume attachment, or changes to network definitions. Conversely, if VM workloads or storage operations place excessive load on the control plane nodes themselves, you can end up with a feedback loop where control plane performance degrades due to resource contention on the same nodes that run etcd. This is one reason why Harvester assigns dedicated management roles and supports topologies where certain nodes carry control plane responsibilities and others carry most compute workloads.
The RKE2 layer uses static pod manifests and standard Kubernetes Operators to keep the control plane healthy. Control plane components are scheduled onto nodes with the appropriate roles and tolerations, and they tend to be guarded against eviction through restricted scheduling rules. Harvester specific controllers, such as those managing hosts and VM backups, are also deployed in a way that targets management nodes preferentially. Understanding these placement rules helps when you diagnose failures. For example, if you see that a management node has gone NotReady, you know that more than just VM workloads are impacted, because that node likely hosts a portion of etcd and several Harvester controllers.
You can see the roles and taints associated with control plane nodes using kubectl. The following example shows the three node control plane in a small cluster, heavily simplified but representative of what you will work with in practice.
apiVersion: v1kind: Nodemetadata: name: harv-mgmt-1 labels: node.harvesterhci.io/role: management node-role.kubernetes.io/control-plane: "true"spec: taints: - key: node-role.kubernetes.io/control-plane effect: NoSchedule---apiVersion: v1kind: Nodemetadata: name: harv-mgmt-2 labels: node.harvesterhci.io/role: management node-role.kubernetes.io/control-plane: "true"spec: taints: - key: node-role.kubernetes.io/control-plane effect: NoSchedule---apiVersion: v1kind: Nodemetadata: name: harv-mgmt-3 labels: node.harvesterhci.io/role: management node-role.kubernetes.io/control-plane: "true"spec: taints: - key: node-role.kubernetes.io/control-plane effect: NoScheduleIn a real cluster, you will also have nodes labeled as compute, and in future versions you may explicitly assign roles at install time instead of relying only on automatic promotion. The key point is that etcd members live on nodes that carry the control plane role, and those nodes form the cluster state failure domain.
Failure domains do not stop at the control plane. Longhorn, for example, has its own concept of replicas and failure domains. It can be configured to distribute replicas across nodes, zones, or racks, depending on how you label your nodes, so that the loss of any one node, or any one label domain, does not destroy all copies of critical data. RKE2 scheduling rules and Harvester best practice guides for cluster networking further define how traffic flows between nodes and how a failure in one part of the fabric affects workloads.
The combination of etcd quorum rules, management node placement, Longhorn replica topology, and networking design forms the real availability posture of a Harvester deployment. When you plan for high availability, you should consider all of these aspects rather than focusing solely on the number of nodes in the cluster. The architecture provides solid tools, but it does not override the fundamental requirements of distributed systems. A three node control plane still follows the same quorum rules, and stretched clusters still contend with latency and partitioning risks.
2.3: Harvester Custom Resources And API Surface
Section titled “2.3: Harvester Custom Resources And API Surface”Although Harvester presents a graphical user interface and a virtualization focused set of pages for hosts, VMs, networks, and volumes, every one of those operations maps directly to Kubernetes API calls. Harvester extends the Kubernetes API through a collection of custom resource definitions that describe virtualization concepts in Kubernetes terms. The Harvester API documentation describes a standard RESTful API at the /v1 endpoint, which exposes these CRDs and allows clients to perform create, read, update, and delete operations on them.
At a high level, there are resources for virtual machines, virtual machine images, virtual machine templates and template versions, volumes, backups, networks, and settings. There are also CRDs for host management, PCI device configuration, and other advanced features. Each of these resources lives in a group such as harvesterhci.io or kubevirt.io, and the Harvester API server aggregates them into a cohesive surface that the UI and tools such as the Terraform provider can consume.
Consider the lifecycle of a VM. When you create a VM from the Harvester interface, the platform creates a VirtualMachine resource in the kubevirt.io API group, possibly along with related resources such as VirtualMachineImage in the harvesterhci.io group if you have uploaded or selected an image. Network configuration might reference NetworkAttachmentDefinition objects from the k8s.cni.cncf.io group, particularly when you configure additional networks via Multus. Backup policies or manual backups create VirtualMachineBackup resources that track backup metadata and status. All of these resources are standard Kubernetes objects in that they can be queried and manipulated with kubectl, subject to authentication and authorization.
The Harvester API goes beyond simple CRD exposure by providing a consolidated REST surface. For example, you can list VMs using an HTTP GET against /v1/kubevirt.io.virtualmachines, or you can retrieve network attachment definitions across namespaces via the k8s CNI API. The documentation shows how to use curl with tokens obtained from Rancher or Harvester to authenticate these calls.
From an automation standpoint, this is important. It means you can treat Harvester as an API driven platform rather than relying only on the UI. Terraform support builds on this model. The official Harvester Terraform provider creates and manages CRDs such as VirtualMachine, VirtualMachineImage, and Volume through the Harvester API, letting you describe VM infrastructure declaratively in HCL and apply it like any other infrastructure as code.
To get a feel for these resources, consider a trimmed down example of a VirtualMachine manifest, similar to what Harvester creates behind the scenes.
apiVersion: kubevirt.io/v1kind: VirtualMachinemetadata: name: web-server-01 namespace: default labels: harvesterhci.io/os: "linux" harvesterhci.io/creator: "admin"spec: running: true template: metadata: labels: kubevirt.io/domain: web-server-01 spec: domain: cpu: cores: 2 resources: requests: memory: 4Gi devices: disks: - name: rootdisk disk: bus: virtio volumes: - name: rootdisk persistentVolumeClaim: claimName: pvc-web-server-01-rootIn Harvester you rarely type this YAML manually, but when you view the VM through kubectl get vm web-server-01 -o yaml, you see a structure of this kind. The running flag represents the desired power state, the domain section describes virtual hardware, and the volumes section references Longhorn backed PVCs. Harvester adds annotations and labels to record extra metadata, such as which image was used, which user created the VM, and which networks are attached.
Virtual machine images are also modeled as CRDs. A VirtualMachineImage object represents an image that Harvester can use as a base for VM volumes. The spec points to a URL, a container registry, or an existing storage location, and includes information such as checksum and size. Harvester controllers handle the import of that image into Longhorn. Template CRDs capture reusable VM configurations, and template version CRDs track versions of those templates. The published CRD definitions in the Harvester repository show fields for CPU, memory, disks, networks, and default network settings that reference a Multus NetworkAttachmentDefinition.
Harvester settings are another important category. There is a Setting CRD in the harvesterhci.io group that stores cluster wide configuration such as the default storage class, the VM migration network, and feature flags. Changing these settings from the UI results in updates to these resources. For example, enabling a dedicated VM migration network involves toggling the vm-migration-network setting and referencing a NetworkAttachmentDefinition. When this setting changes, Harvester restarts relevant pods such as virt-handler to apply the new configuration.
The API surface is accessible directly through HTTP. A simple example using curl can illustrate how to retrieve VMs from the Harvester API once you have an access token.
# HARVESTER_URL should be https://<harvester-vip>:30443# TOKEN should be a valid API token obtained from Harvester or Rancher
curl -sS \ -H "Authorization: Bearer ${TOKEN}" \ "${HARVESTER_URL}/v1/kubevirt.io.virtualmachines" |jq '.data[].metadata.name'This request asks the Harvester API for all VirtualMachine resources and prints their names using jq. The same pattern applies to other resource types, and in many environments this approach becomes part of custom tooling around Harvester.
Understanding these CRDs and the API surface gives you a great deal of operational flexibility. When something behaves unexpectedly, you can look directly at the underlying objects instead of guessing what the UI is doing. When you want to integrate Harvester into CI pipelines or external control planes, you can use its native APIs instead of scripting clicks. The architecture deliberately exposes these details because the platform is built on Kubernetes rather than hiding it behind a proprietary interface.
2.4: How VMs Map To Pods And Nodes Through KubeVirt
Section titled “2.4: How VMs Map To Pods And Nodes Through KubeVirt”The final piece of the architecture that you need to understand is how KubeVirt converts a virtual machine definition into a running process on a specific node. This flow is central to how Harvester manages VM lifecycle. It also shapes how you debug scheduling problems, networking behavior, and performance issues.
In KubeVirt, a VirtualMachine resource acts as a higher level construct that controls when and how a VM should run. Under the hood, KubeVirt represents the actual running instance of a VM as a VirtualMachineInstance object. When you set spec.running on a VirtualMachine to true, KubeVirt’s controllers create a matching VirtualMachineInstance if one does not already exist.
The VirtualMachineInstance is a namespaced Kubernetes resource. KubeVirt’s virt-controller watches for these objects and is responsible for creating pods that will host the VMs. For each VirtualMachineInstance, it creates a pod that runs KubeVirt’s virt-launcher container, which in turn spawns the QEMU process that runs the guest. The pod is scheduled by the standard Kubernetes scheduler, which takes into account resource requests, node selectors, affinities, and taints, just like it does for any other pod.
On the target node, a virt-handler daemonset pod manages the actual interaction with the host. It configures networking through CNI plugins, sets up tap interfaces and bridges, applies cgroup and SELinux rules, and monitors the health of the VM process. This design means that the VM lifecycle is fully integrated into Kubernetes. When you cordon a node or mark it unschedulable, VM pods are no longer scheduled there. When you evict pods, KubeVirt treats VM pods according to policies defined in the VirtualMachine or VirtualMachineInstance objects. Live migration involves temporarily creating an additional pod on a target node, streaming memory and state from the source, and then switching over control once synchronization is complete.
Harvester builds on this machinery. The Harvester UI presents VMs as first class objects, but behind the scenes each VM is still represented by a VirtualMachine and a VirtualMachineInstance, along with pods, PVCs, and network attachments. When you open the VM detail view and see which node it is running on, that information comes from Kubernetes through these resources.
A minimal mapping can be seen through a combination of kubectl get commands. For a VM called web-server-01 in the default namespace, you can inspect the KubeVirt resources and the pod that actually runs it.
# Show the VirtualMachine definitionkubectl get vm web-server-01 -n default
# Show the corresponding VirtualMachineInstancekubectl get vmi web-server-01 -n default -o wide
# Show the pod that hosts the VMIkubectl get pod -n default -l kubevirt.io/domain=web-server-01 -o wideThe VirtualMachineInstance output shows which node the instance is running on and includes a phase field, for example Running, Scheduling, or Migrating. The pod output reveals the node, IP addresses, and container statuses. If there is a problem, such as a host with insufficient memory or a network that cannot be attached, the pod and VMI events provide detailed error messages.
The VirtualMachine spec includes policies that control restart behavior. KubeVirt can treat VMs as pets or cattle depending on how you configure it. A pet style VM, such as a database with local state stored in a specific PVC, may be configured not to restart automatically if the node fails. A more stateless VM can be configured to restart on another node, much like a deployment or statefulset pod. Harvester surfaces some of these policies as options in the VM creation UI, but you can always inspect and adjust them at the YAML level.
Live migration is a good example of how VM to pod mapping works in practice. When you initiate a migration, Harvester instructs KubeVirt to create a migration object for the VMI. KubeVirt then schedules a target pod on a different node, using the same image and configuration. The source node continues to run the VM while KubeVirt streams memory and device state to the target. Once synchronization reaches a safe point, the VM is paused on the source, final changes are copied, and the VM resumes on the target. The original pod is then terminated. From Kubernetes’ perspective, this looks like a controlled replacement of a pod on one node with a pod on another, with additional orchestration to keep the VM state consistent.
Networking follows a similar pattern. The pod hosting the virt-launcher container attaches to one or more CNI networks. For simpler setups, the pod uses the primary cluster network, and KubeVirt configures a bridge and tap interface inside the pod so that the VM sees a virtual NIC. For more complex setups, Harvester uses Multus and NetworkAttachmentDefinition resources to attach additional networks to the pod, which then translate into additional NICs inside the VM. The KubeVirt networking documentation describes how virt-launcher creates a bridge, creates a tap device, and moves the pod IP onto the VM side of that bridge, so that the VM uses the pod IP directly.
The storage path is built around Longhorn volumes and Kubernetes PVCs. A VirtualMachine spec references volumes backed by PVCs, and those PVCs reference a Longhorn storage class. Longhorn then ensures that volume replicas are created across appropriate nodes and that a volume controller is ready to attach to the node where the VM pod is scheduled. When the VMI is scheduled, KubeVirt requests volume attachment through the standard Kubernetes mechanisms, and Longhorn attaches the volume to the node using an iSCSI or similar transport. Inside the pod, the volume appears as a block device, and KubeVirt attaches that to the VM as a virtual disk.
To tie these pieces together, you can look at a combined YAML example that shows a VirtualMachine that references both a network attachment and a PVC. In a Harvester cluster this would typically be generated by the UI, but viewing it explicitly can make the mapping clearer.
apiVersion: kubevirt.io/v1kind: VirtualMachinemetadata: name: app-server-01 namespace: defaultspec: running: true template: metadata: labels: kubevirt.io/domain: app-server-01 spec: domain: cpu: cores: 4 resources: requests: memory: 8Gi devices: interfaces: - name: default-net masquerade: {} - name: vlan-net bridge: {} disks: - name: rootdisk disk: bus: virtio networks: - name: default-net pod: {} - name: vlan-net multus: networkName: app-vlan-net volumes: - name: rootdisk persistentVolumeClaim: claimName: pvc-app-server-01-rootIn this configuration, the pod created by KubeVirt will be attached to the default cluster network and to the Multus network app-vlan-net. Inside the pod, KubeVirt configures two virtual interfaces for the VM, mapping one to each network. The pod also mounts the PVC that Longhorn backs with a replicated volume, and that becomes the root disk of the VM.
Once you internalize this mapping from VM to VMI to pod to node, Harvester’s behavior feels consistent with other Kubernetes based platforms. VM placement is subject to the same scheduling rules as pods. Storage availability depends on the same PVC and storage class abstractions. Networking issues show up as pod level events and CNI logs. Harvester’s value lies in providing a strongly integrated experience on top of those primitives, but the underlying mechanics are transparent and accessible to anyone who knows how to work with Kubernetes and KubeVirt.