Did you know that with KubeVirt you can manage both containers and VMs?

What is KubeVirt?

KubeVirt is an open source (CNCF sandbox) project that allows you to manage Virtual Machines on Kubernetes. It is basically a virtual machine management addon for Kubernetes. Its goal is to address the needs of development teams making it possible for virtualization solutions to run on top of Kubernetes.

But it is not only about developers, KubeVirt integrated with existing k8s tools and practices such as monitoring, alerting, logging, auditing and more.

Why is it important?

On the one hand we have VMs, which we can agree have a major role providing infrastructure on demand to Dev and Ops teams.

On the other hand we have Containers, which gained popularity and now are the preferred application deployment mechanism. However, containers cannot satisfy all use-cases.

For example, if you want to develop a containerized application but it might have dependency on other components that have to run in a VM. It would be great to have a tool that allows you to get the benefits of VMs and containers together. This is the gap that KubeVirt is aiming to solve.

With KubeVirt you can:

  • Leverage KubeVirt with Kubernetes to manage virtual machines for impractical-to-containerize apps.
  • Combine existing virtualized workloads with new container workloads on the one platform.
  • Support development of new microservice applications in containers that interact with existing virtualized applications.

How does it work?

KubeVirt is designed to turn K8s into a unified development platform where developers are able to build, modify and deploy applications residing in both containers as well as Virtual Machines in a common shared environment.

It extends Kubernetes by adding additional virtualization resource types (especially the VM type) through Kubernetes’s Custom Resource Definitions API.

KubeVirt allows you to migrate virtual machines workloads in its present condition into a Kubernetes cluster.

To launch virtual machines the functionality and business logic needs to be added to the Kubernetes cluster by running additional controllers and agents on an existing cluster.

The necessary controllers and agents are provided by KubeVirt.

As of today KubeVirt can be used to declaratively:

  • Create a VM
  • Schedule a VM on a Kubernetes cluster
  • Launch a VM
  • Stop a VM
  • Delete a VM


For example if you are developing an application that is composed mostly of container based microservices but there’s one legacy service that can only run in a virtual machine. With KubeVirt you can enable a VM to run and be managed by Kubernetes alongside the containers that host the microservices.

KubeVirt makes it possible to have mature virtualization technology as well as Kubernetes container orchestration together. You get the best of both worlds!

KubeVirt does not focus solely on developers, it also makes it easier for cluster operators to manage both virtual machines and containers from a single platform. It accomplishes by integrating existing K8s tools and practices (e.g. monitoring, alerting, logging, auditing, etc.)

This is how KubeVirt high-level architecture looks like.

Benefits

  • Faster time to market
  • Reduced costs
  • Simplified management
  • You can enable K8s to schedule, deploy and manage VMs just like any other containerized workload
  • Teams with a reliance on existing virtual machine-based workloads are empowered to rapidly containerize applications
  • With virtualized workloads placed directly in development workflows, teams can decompose them over time while still leveraging remaining virtualized components as is comfortably desired

Conclusion

Kubevirt might be for you if:

  • you have an application that currently runs in VMs and you don’t want to convert it to containers but you want to manage it with Kubernetes
  • you have an application that cannot be containerized and has to run in a VM

Keep in mind that KubeVirt is still a young project that is currently in incubating state according to CNCF. The community is growing rapidly and the development is going at a fast pace as well, so we’re hoping to get a mature, stable software with unique features for Kubernetes.