Chapter 3. How KubeVirt Works

KubeVirt is an open source project that lets you run VMs alongside containerized workloads in a Kubernetes cluster. KubeVirt brings the best of both worlds: VMs work with the usual virtualization tools, and you can also manage them with the Kubernetes APIs, tools, and utilities you’re already using on your cluster. Managing noncontainerized workloads on VMs in the same cluster with your containerized workloads means that these two kinds of applications can communicate easily with each other. You can even run VMs and containerized applications on the same node.

KubeVirt is an operator that sets up a pod with two containers to manage a VM. One container stores the disk image for the VM, and the other manages the VM itself. You can install or remove KubeVirt on an existing cluster, which means that you can add VMs to clusters with existing containerized applications. This is useful for gradually migrating applications or for lifting and shifting monolithic applications that you can’t easily containerize. Figure 3-1 shows how VM pods and containerized application pods coexist on a single Kubernetes cluster with KubeVirt.

Figure 3-1. VM pods and container application pods on a Kubernetes cluster with KubeVirt

KubeVirt builds on the Kubernetes declarative model, defining VMs using a Kubernetes CRD. To Kubernetes, a VM looks just like any other containerized ...

Get What Is KubeVirt? now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.