This is an excerpt from Chapter 3 of “Running Virtual Machines connected Kubernetes: A Practical Roadmap for Enterprise Migrations,” a caller eBook by acclaimed investigation expert and exertion master Janakiram MSV and sponsored by Spectro Cloud. From exploring nan architecture and life rhythm of virtual machines (VMs) successful a unreality autochthonal environment, to building cross-functional migration teams and selecting nan correct tools, this free book, now disposable for download, helps endeavor leaders navigate this once-in-a-generation displacement pinch confidence.
KubeVirt Fundamentals: Bridging VMs and Containers
As organizations floor plan their people distant from accepted virtualization, KubeVirt emerges not conscionable arsenic a instrumentality but arsenic a foundational exertion that makes a phased, pragmatic migration to Kubernetes possible. It acts arsenic a bridge, enabling nan coexistence of bequest virtual machines and modern containers connected a single, unified platform: Kubernetes.
Understanding KubeVirt’s architecture and capabilities is nan first measurement successful leveraging it to derisk nan migration process, consolidate infrastructure and accelerate nan travel to a unreality autochthonal operating model.
This section explores nan method foundations, applicable limitations and real-world implementation patterns that are basal for infrastructure evaluation.
Architecture Overview: How KubeVirt Extends Kubernetes
KubeVirt’s creation accuracy is straightforward and builds firmly connected aspects wherever Kubernetes already excels. Instead of creating a new, parallel orchestration strategy for virtual machines, KubeVirt extends nan reputable Kubernetes API and power plane, enabling it to negociate VMs arsenic autochthonal resources. It efficiently delegates halfway functions for illustration scheduling, networking and retention straight to Kubernetes, while layering connected nan circumstantial logic required for virtualization.

KubeVirt adds virtualization capabilities to Kubernetes.
At its heart, a KubeVirt VM is simply a process moving wrong a modular Kubernetes pod. This attack allows VMs and containers to tally broadside by broadside connected nan aforesaid worker nodes, pass complete nan aforesaid web and usage nan aforesaid retention resources, each managed done a azygous pane of glass.
To execute this, KubeVirt introduces 3 main types of components into nan cluster:
- Custom Resource Definitions (CRDs): These are extensions to nan Kubernetes API that specify caller entity types. KubeVirt adds respective CRDs, astir notably VirtualMachine and VirtualMachineInstance (VMI). This allows administrators to specify a VirtualMachine utilizing a declarative YAML manifest, conscionable arsenic they would for immoderate different Kubernetes object, specified arsenic a pod.
- Controllers: These are cluster-wide components that incorporate nan business logic for managing nan caller CRDs. They tally arsenic pods and watch nan Kubernetes API for changes.
- Daemons: These are node-specific agents, deployed arsenic a DaemonSet, that are responsible for managing nan VM life rhythm connected each worker node successful nan cluster.
Key Components and Their Roles
The interplay betwixt KubeVirt’s components creates a seamless virtualization furniture wrong Kubernetes. While an usability tin instal each basal components, knowing nan individual roles of these components is cardinal to troubleshooting and effective management.
- VirtualMachine and VMI: These are nan 2 superior CRDs that users interact with. The VirtualMachine entity represents nan persistent, desired authorities of a virtual machine. It tin beryllium started and stopped while retaining its configuration and data. The VirtualMachineInstance represents nan existent moving lawsuit of that VirtualMachine. A VMI is much ephemeral, existing only while nan VirtualMachine entity is successful a moving state, and is tightly coupled to nan pod that hosts it.
- virt-api server: This serves arsenic nan HTTP API introduction constituent for each virtualization flows, acting arsenic an interface for nan operations of VMI CRDs. It validates, processes and persists VMI and VirtualMachine assets definitions into Kubernetes, allowing nan remainder of nan KubeVirt power level to react.
- virt-controller: This is nan central, clusterwide controller. Its superior occupation is to watch for nan creation of caller VMI objects. When a VMI is defined, virt-controller creates a corresponding pod that will yet big nan VirtualMachine process. It handles high-level operations and orchestrates analyzable actions, specified arsenic unrecorded migrations.
- virt-handler: This is simply a DaemonSet, meaning an lawsuit that runs connected each worker node. It acts arsenic nan node-specific agent. When a VM’s pod is scheduled onto its node, virt-handler takes over. It communicates pinch nan virt-launcher wrong nan pod to execute each nan basal operations to start, extremity and negociate nan VM process connected that circumstantial host.
- virt-launcher: For each moving VM, location is simply a dedicated pod, and nan superior instrumentality wrong that pod runs nan virt-launcher component. This constituent is nan last nexus successful nan chain. It receives instructions from virt-handler and uses a section libvirtd lawsuit to commencement and negociate nan existent QEMU/Kernel-based Virtual Machine (KVM) process that constitutes nan virtual machine. It besides ensures a graceful shutdown by trapping signals from Kubernetes and passing them to nan VM process.
- libvirtd: This is simply a hypervisor guidance daemon moving wrong nan virt-launcher container. It exposes a power interface to QEMU/KVM, handling VM life-cycle commands specified arsenic start, stop, pause, resume and migrate. It abstracts distant nan complexities of interacting straight pinch QEMU by offering a unchangeable API.
- QEMU: This is simply a user-space emulator and virtualizer invoked by libvirtd wrong nan virt-launcher container. QEMU emulates nan VM’s hardware situation and executes nan impermanent operating strategy pinch hardware acceleration done KVM erstwhile available. It handles instrumentality emulation, I/O operations and CPU virtualization.

Communication and retention of further controllers and daemons.
To publication more, download “Running Virtual Machines connected Kubernetes: A Practical Roadmap for Enterprise Migrations” today!

YOUTUBE.COM/THENEWSTACK
Tech moves fast, don't miss an episode. Subscribe to our YouTube channel to watercourse each our podcasts, interviews, demos, and more.
Group Created pinch Sketch.
English (US) ·
Indonesian (ID) ·