Last week I wrote an introductory post around KubeVirt giving some insight into were it sits in the current Kubernetes and Virtualization landscape. As mentioned, there is a somewhat steep learning curve in understanding its architecture and when looking to go beyond lab deployments the installation can be a bit tricky. That is very much in line with the Kube side of the project… and those that have played with Kubernetes knows that it takes some getting used to… and that is only after you have gotten it to a steady state deployment. Just like Kubernetes as a whole, the best way to consume KubeVirt outside of the basic labs might be to go down the managed platform path. At this stage, there is not a lot out there, but Platform9 has recently released a feature preview of KubeVirt that can be deployed and managed through their Managed Kubernetes platform.
As a reminder…
What is KubeVirt?
KubeVirt, started in 2016 and is an open source project distributed under an Apache 2.0 License from 2017. It is a set of controllers (CRDs) which allow a way to run Virtual Machine on Kubernetes. It uses the same native constructs of Kubernetes such as scheduling, storage, networking, monitoring and tooling via kubectl. It was created by Red Hat to enable Kubernetes to provision, manage, and control VMs alongside container resources. It was built as a way to make it easier to move from a virtual infrastructure to a Kubernetes and container based infrastructure, one workload at a time
I’ve been writing about and testing/using Platform9 for a number of years now and it came as no surprise to me to they would look to embrace KubeVirt into their management stack. Platform9 has always dealt with virtualization… be it VMware, or KVM based OpenStack so to offer the ability to marry that up to their leading focus of Kubernetes made sense.
Platform9 Managed KubeVirt Landing Page: https://platform9.com/managed-kubevirt/
Kubernetes Cluster Deployment with KubeVirt:
First thing is first is that just like setting up a BareOS cluster using Ubuntu or CentOS virtual machines you need to prep the hosts.
I’ve written previously on that process and you can also find the quick start guide here.
Once the Platform9 HostAgents have been deployed through the Platform9 Web Console we can Create a new Cluster
As can be seen below, there is a new option to enable KubeVirt which also enables the Network Plugin Operator.
Make a big note, that this option is not ready for production!
In my lab, I have prepped three hosts. There isn’t any offical material that I could find, but when I tried a single host deployment, the KubeVirt components couldn’t be installed. So below, is the first step in selecting a Master Node added.
Next step is to add the Worker Nodes.
Finally, working through the steps, the Network is configured. I would recommend installing MeltalLB as part of the initial cluster install.
Once that is done, the final step completes the actions and Kubernetes is deployed to the Cluster Hosts and as can be shown below, part of that install is now KubeVirt.
This can be further validated on the Kubernetes Cluster its self by running a kubectl get pods -n kubevirt command which should display something similar to the below.
From here, in the Platform9 Web Console, under the Early Access Virtual Machine menu, VMs and VM Instances can be created. It must be noted that there are still a few things that need fixing with the early access like not being able to select the Namespace to deploy the VM into… at this stage it is suggested that this be done from the cli… however the UI is ready and in place for future updates
You should now be able to start creating and managing virtual machines in the Platform9 Managed Kubernetes cluster!
For more on KubeVirt commands, the KubeVirt User Guide is a great place to get started. But i’ll look to add a few more posts on VM creation, configuration, import and management as well over the next few weeks… as mentioned… the learning curve is steep at the moment and this should be treated as a science experiment of sorts to begin with.