KubeVirt — Run Virtual Machines on Kubernetes
KubeVirt extends Kubernetes with VM-native workloads. It lets you declare, schedule and manage traditional virtual machines as first-class Kubernetes objects alongside containers, sharing the same networking and storage.
What it is
KubeVirt is a Kubernetes extension that adds virtual machine workloads as first-class citizens to your cluster. Instead of choosing between containers and VMs, KubeVirt lets you run both side by side, sharing the same networking, storage, and scheduling infrastructure.
The project targets platform engineers managing hybrid workloads where some applications cannot be containerized yet. Legacy Windows apps, licensed software tied to specific OS images, and workloads requiring full kernel access are common use cases.
How it saves time or tokens
Without KubeVirt, teams maintain separate infrastructure stacks for containers and VMs, doubling operational overhead. KubeVirt eliminates this split by letting you define VMs with the same kubectl commands and YAML manifests you already use for pods. One API, one control plane, one set of RBAC policies. Migration from standalone VMware or KVM setups becomes incremental rather than a big-bang rewrite.
How to use
- Install the KubeVirt operator and custom resource on your cluster:
export VERSION=v1.3.0
kubectl apply -f https://github.com/kubevirt/kubevirt/releases/download/${VERSION}/kubevirt-operator.yaml
kubectl apply -f https://github.com/kubevirt/kubevirt/releases/download/${VERSION}/kubevirt-cr.yaml
- Create a VirtualMachine manifest and apply it:
apiVersion: kubevirt.io/v1
kind: VirtualMachine
metadata:
name: demo
spec:
running: true
template:
spec:
domain:
devices:
disks:
- name: disk0
disk:
bus: virtio
resources:
requests:
memory: 512Mi
- Access the VM console with
virtctl console demo.
Example
# List running VMs
kubectl get vmi
# SSH into a VM via virtctl
virtctl ssh user@demo
# Live migrate a VM to another node
virtctl migrate demo
# Stop a VM
virtctl stop demo
Related on TokRepo
- AI Tools for DevOps — more infrastructure automation tools for Kubernetes environments
- Automation Tools — scripts and workflows for infrastructure management
Common pitfalls
- KubeVirt requires hardware virtualization support (Intel VT-x or AMD-V) on worker nodes; nested virtualization in cloud VMs adds latency
- VM images stored as PVCs can be large; plan storage capacity and use CDI (Containerized Data Importer) for efficient image management
- Network policies that work for pods may not cover VM traffic correctly; test VM-to-pod connectivity explicitly after setup
Frequently Asked Questions
KubeVirt does not replace the hypervisor layer. It uses libvirt and QEMU under the hood, running on top of KVM. What it replaces is the separate management plane. Instead of managing VMs through vCenter or virsh, you manage them through the Kubernetes API with kubectl and standard manifests.
Yes. KubeVirt supports live migration using the virtctl migrate command. The VM moves to another node without downtime, provided shared storage is configured and both nodes have compatible CPU features.
KubeVirt VMs use Kubernetes PersistentVolumeClaims for disk storage. Any CSI-compliant storage provider works, including Ceph, Longhorn, local-path, and cloud provider block storage. The Containerized Data Importer (CDI) handles importing disk images into PVCs.
By default, VMs connect to the same pod network as containers using a bridge or masquerade binding. For advanced use cases like SR-IOV passthrough or multiple NICs, Multus CNI can be configured to attach VMs to additional networks.
KubeVirt is a CNCF incubating project used in production by organizations running hybrid container-VM workloads. Red Hat OpenShift Virtualization is built on KubeVirt, which provides commercial support and validation at scale.
Citations (3)
- KubeVirt GitHub— KubeVirt extends Kubernetes with VM workloads
- CNCF Landscape— CNCF incubating project status
- KubeVirt Documentation— KubeVirt architecture and concepts
Related on TokRepo
Discussion
Related Assets
Miniflux — Minimalist Self-Hosted Feed Reader
Miniflux is an opinionated, minimalist RSS and Atom feed reader written in Go that focuses on simplicity, speed, and content readability.
Kanboard — Minimalist Kanban Project Management
Kanboard is a free and open-source Kanban project management tool focused on minimalism, productivity, and getting things done without unnecessary complexity.
Homer — Static Server Dashboard with YAML Configuration
Homer is a dead-simple static dashboard for your server services, configured entirely through a single YAML file with no database or backend required.