KubeWHAT?
using KubeVirt to bring VMs to K8S

$ whoami

Vatsal Parekh

Quality Engineer @ Red Hat

Pune, India

@vatsalparekh1

vatsalparekh.me

THE WORLD OF
VIRTUAL MACHINES

  • isolated
  • flexible & secure
  • scalable
  • Well, kind of...relatively

VMs are fun!

But VMs are so 2014ish...

CONTAINERS ARE
THE WAY FORWARD

The Game Changer

Run everything on Kubernetes

#CRDeverything

But What about the legacy workload?

I still need VMs...


The emerging path for best of both the world

KubeVirt

BUT WHY?

VMs on K8S?

USE CASES:

  • Bring orchestration ability of Kubernetes to VMs
  • VMs in a cloud-native world, easily integrate with istio, various storage and more
  • Provides a consistent migration path to a container centric infrastructure
  • more...

Makes sense?

Yes, maybe...

But how?
replace Containers with VMs?

Simple answer

Libvirt/kvm inside container inside pod

Architecture 

Virtual Machine Objects

  • Virtual Machines have their own kind

    • Ability to express all common virtual machine parameters and actions

    • Targeted feature set is comparable to libvirt

apiVersion: kubevirt.io/v1alpha1
kind: VirtualMachine
metadata:
  name: vm-fedora
spec:
  domain:
    devices:
      disks:
      …
    resources:
      requests:
        memory: 1024M
  volumes:
  …
status:
  interfaces:
  - ipAddress: 172.17.0.12
  nodeName: localhost
  phase: Running

VMs and Pods

  • Virtual Machines live in pods

    • Transparent to higher-level management systems (monitoring, metrics, …)

    • Virtual Machines leverage pods
      Metadata - Labels and annotations, passed through and additional CPU and memory resources, Storage and network, Specific events

KubeVirt Components

KubeVirt
The Virtual Machine Operator
github.com/kubevirt/kubevirt

Containerized Data Importer (CDI)

 Controller for importing disks

kubevirt/containerized-data-importer

v2v

APB for Importing whole virtual machine
kubevirt/v2v-job

Disks - Import and Storage

  • Virtual Machine disks are mapped to and stored on PersistentVolumes
     
  • 1:1 mapping of disk to PV - Alignment with Kubernetes concepts
     
  • Mutable and immutable
     
  • Benefit from the Kubenretes/OpenShift ecosystem and thus indirectly from OpenStack Cinder and it’s own ecosystem
  • Virtual Machine disks are imported using
    CDI (Containerized Disk Importer)

    • Ability to fetch disk images via http, …

    • Upload is in the works

Network

Connectivity and Service Integration

  • Virtual Machine are connected to the regular pod network

    • From the outside there is no difference between a VM and pod

  • Applications within virtual machines are exported using Service and Routes

    • Selection using labels and selectors

Integrations

  • Ansible
  • Helm
  • Packer
  • ManageIQ
  • Ansible Module
  • Foreman
  • Terraform

ping kubevirt

Q&A