Testing KubeVirt + Kata-Containers for running VMs inside Kubernetes in a Vagrant + qemu VM (updated)

I wanted to be able to test deployment of VMs inside a Kubernetes cluster with KubeVirt (and maybe Kata-Containers too), using a VM-based testbed. An additional requirement was trying to get a similar setup script that could be applied to a regular physical host, should the tests be conclusive.

I’ve adapted an existing installation procedure for installation on Vagrant Ubuntu VMs, and the result is there:
https://github.com/olberger/vagrant-k8s-kubevirt-katacontainers

I runs a Vagrant VM with libvirt+qemu/kvm, installed with Ubuntu 18.04, and provisions a Kubernetes cluster using kubeadm (no longer minikube, unlike what was done in the original repo I’ve forked from).

Inside the cluster, containers are run with CRI-O, which seems to be compatible with KubeVirt. Packages are “official” k8s packages (except for CRI-O and KubeVirt).

I hope it’ll work for you too, provided that you can run nested virtualization.

Next steps will be trying I’ve also added Kata-Containers to the cluster. It seems that kata-containers and KubeVirt are compatible (all running with libvirt below).

Here’s a screencast :

 

Updated: I’ve now added Kata-Containers deployment to the provisioning scripts. Also, it runs 18.04 now (LTS too, but more recent than 16.04). Oh, and the scripts seem to be useable outside Vagrant, on a regular Ubuntu server too.

Next steps, testing various workloads on the cluster for virtual labs deployments.

One thought on “Testing KubeVirt + Kata-Containers for running VMs inside Kubernetes in a Vagrant + qemu VM (updated)”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.