What is KubeVirt?
KubeVirt is an open source project that makes it possible to run, deploy, and manage virtual machines (VMs) with Kubernetes as the underlying orchestration platform. The process of running virtual machines within containers is known as container-native virtualization. KubeVirt enables container-native virtualization by packaging those virtual machines inside containers and managing both workloads from a single console.
With KubeVirt, virtual machines behave the same way they would in a traditional virtualization environment, but they can run on the same platform as containerized microservices and cloud-native applications. All workloads in the environment, including VMs, benefit from the same Kubernetes infrastructure, tools, and management.
KubeVirt is sponsored by the Cloud Native Computing Foundation (CNCF), and it is the open source foundation for Red Hat® OpenShift® Virtualization, a feature of Red Hat OpenShift that supports the migration and management of traditional virtual machines on a trusted hybrid cloud application platform.
How does KubeVirt work?
KubeVirt works by extending the Kubernetes application programming interface (API) so it can interact with virtual machines in the same way as other Kubernetes resources and tools. This makes it possible for containers and virtual machines to share the same cluster, nodes, and networks.
KubeVirt’s added functionality is composed of 3 main components:
- Custom resource definitions (CRDs): A custom resource is an object that extends the Kubernetes API or allows you to introduce your own API into a project or a cluster. A custom resource definition file defines your object kind and lets the API Server handle the entire lifecycle. KubeVirt brings a CRD to the Kubernetes API that enables it to handle virtual machines like other Kubernetes objects (such as pods).
- Controllers: A controller is a set of deployments running on the cluster that provide an API endpoint for managing the new KubeVirt CRDs.
- Agents: Agents run on a cluster’s worker nodes to manage node tasks related to virtualization.
Another way to think of KubeVirt is as a pod running with a KVM-based virtual machine inside of it. In Kubernetes, a pod is a group of containers that run together and share the same resources, and KVM (Kernel-based Virtual Machine) is an open source technology that extends the Linux® kernel to function as a hypervisor. With KubeVirt, virtual machine instances run just like pods. This allows KubeVirt to manage VM states like "stopped," "paused," and "running," as well as perform operations like the provisioning, scheduling, and migration of virtual machines.
Red Hat resources
What can you do with Kubevirt?
Create virtual machines
From the virtctl command line with the subcommand "create vm", you can create virtual machines within a Kubernetes environment. You can also control instance types and preferences to manage configurations across many virtual machines at once, including setting performance profiles and customizing runtime characteristics.
Manage virtual machines
The virtctl command line interface (CLI) works alongside kubectl, the standard Kubernetes command line tool, to provide virtualization-specific actions for managing virtual machines in a Kubernetes cluster. With virtctl, a virtual machine admin can:
- Stop, start, restart, and pause virtual machines.
- Manage disk images.
- Access the virtual machine’s serial, graphical, and ssh consoles.
- Migrate between nodes.
Kubernetes orchestration and scheduling provides multiple layers of management to help keep your VMs up and running smoothly. If you are also running container workloads, KubeVirt helps you manage and monitor your containers and VMs from a single control plane.
Migrate virtual machines
KubeVirt supports multiple virtual machine migration methods, including live migration. Live migration is the process of moving a virtual machine and remapping its storage from one host to another without interrupting access to the VM. This is a good option for VMs that require constant uptime, and you can avoid disruptions to your operations as you migrate between nodes or platforms.
Experiment and scale
Running virtual machines on Kubernetes lets you experiment with additional functionality. For example, the Containerized Data Importer (CDI) is a compatible technology that enables disk storage for KubeVirt VMs and can manage storage resources.
Kubernetes is also built to scale. As you experiment with new features, add functionality to your workloads, and modernize legacy applications, you can scale up and down automatically based on central processing unit (CPU) usage.
Kubevirt benefits
Cloud-native integration
KubeVirt makes it possible to run workloads that aren’t easily containerized alongside cloud-native apps and microservices. Virtualized application components become a part of a unified development platform where developers can build, manage, deploy, and scale applications regardless of whether components are containerized, virtualized, or a mix of the two.
With KubeVirt, virtual machines can also benefit from integration with various Kubernetes-native features, such as role-based access control (RBAC), integrated monitoring and logging, service mesh, and more.
Modernization
Virtualization makes it possible to quickly start and stop different operating system environments on a single piece of hardware. This approach offers a host of benefits to an IT ecosystem, including flexibility, speed, and stability. But as virtualization platforms evolve and become more costly, some enterprises are looking for new solutions. KubeVirt is an appealing option because it’s not just a replacement hypervisor—it offers a path and platform for modernization.
With KubeVirt, you can create and run containers and VMs side by side, but you also receive a unified platform on which to develop new applications and modernize legacy workloads. As you modernize, you’ll unlock the resources and technology needed to explore advancements in cloud-native development, artificial intelligence, and machine learning.
Advanced features and parity
As a CNCF Incubating project, KubeVirt not only launches with the advanced features and functionality native to Kubernetes—it is consistently improved and expanded by open source community contributors.
KubeVirt also offers feature parity with other enterprise virtualization platforms, including VMware vSphere and HyperV, so you can perform the same tasks you’re used to in a traditional virtualization environment.
Performance
KubeVirt can address changing CPU requirements and memory allocation, resulting in lower latency when compared to traditional virtualization solutions. KubeVirt also streamlines the abstraction layer between bare metal hardware and runtime environments for more efficient use of resources and better performance.
The KubeVirt community special interest scale (SIG-scale) group identified a need to evaluate the performance and scalability of KubeVirt across releases, so they developed techniques to monitor how KubeVirt scales in datacenter environments. KubeVirt now shares this performance and scalability data after each release.
Built-in security
KubeVirt takes advantage of Kubernetes-native security, which ensures that policies are applied consistently, across all environments—including virtual machines. It lets users specify a single configuration, such as a network policy, that should apply to all pods in a deployment, rather than having to configure system-level controls on every host in a cluster. This functionality makes it easier to manage the security of your virtual machines consistently and at scale.
By tying policies into CI/CD systems and the Kubernetes admission controller framework, organizations can more easily apply control policies early in the software development lifecycle, preventing exposures at runtime.
KubeVirt and Red Hat
Red Hat OpenShift Virtualization is a modern application platform based on KubeVirt and KVM that can run virtual machines and containers side by side. The included migration toolkit for virtualization provides the tools you need to migrate from a traditional virtualization platform in a few simple steps. Accelerate delivery with Red Hat Ansible® Automation Platform–from migration at scale to Day 2 operations and remediation. Monitor the security and performance of your VMs from a single console with Red Hat Advanced Cluster Management for Kubernetes. With additional support options and partner integrations for storage, backup and disaster recovery, and networking, you can rely on Red Hat to keep your virtual infrastructure running smoothly throughout the hybrid cloud–and help you modernize when you’re ready.
The official Red Hat blog
Get the latest information about our ecosystem of customers, partners, and communities.