KubeVirt v0.3.0-alpha.3: Kubernetes native networking and storage
First post for quite some time. A side effect of being busy to get streamline our KubeVirt user experience.
KubeVirt v0.3.0 was not released at the beginnig of the month.
That release was intended to be a little bigger, because it included a large architecture change (to the good). The change itself was amazingly friendly and went in without much problems - even if it took some time.
But, the work which was building upon this patch in the storage and network areas was delayed and didn’t make it in time. Thus we skipped the release in order to let storage and network catch up.
The important thing about these two areas is, that KubeVirt was able to connect a VM to a network, and was able to boot of a iSCSI target, but this was not really tightly integrated with Kubernetes.
Now, just this week two patches landed which actually do integrate these areas with Kubernetes.
Storage
The first is storage - mainly written by Artyom, and finalized by David - which allows a user to use a persistent volume as the backing storage for a VM disk:
metadata:
name: myvm
apiVersion: kubevirt.io/v1alpha1
kind: VirtualMachine
spec:
domain:
devices:
disks:
- name: mypvcdisk
volumeName: mypvc
lun: {}
volumes:
- name: mypvc
persistentVolumeClaim:
claimName: mypvc
This means that any storage solution supported by Kubernetes to provide PVs can be used to store virtual machine images. This is a big step forward in terms of compatibility.
This actually works by taking this claim, and attaching it to the VM’s
pod definition, in order to let the kubelet
then mount the respective
volume to the VM’s pod. Once that is done, KubeVirt will take care to
connect the disk image within that PV to the VM itself. This is only
possible because the architecture change caused libvirt to run inside
every VM pod, and thus allow the VM to consume the pod resources.
Side note, another project is in progress to actually let a user upload a virtual machine disk to the cluster in a convenient way: https://github.com/kubevirt/containerized-data-importer.
Network
The second change is about network which Vladik worked on for some time. This change also required the architectural changes, in order to allow the VM and libvirt to consume the pod’s network resource.
Just like with pods the user does not need to do anything to get basic network connectivity. KubeVirt will connect the VM to the NIC of the pod in order to give it the most compatible intergation. Thus now you are able to expose a TCP or UDP port of the VM to the outside world using regular Kubernetes Services.
A side note here is that despite this integration we are now looking to enhance this further to allow the usage of side cars like Istio.
Alpha Release
The three changes - and their delay - caused the delay of v0.3.0 - which will now be released in the beginnig of March. But we have done a few pre-releases in order to allow interested users to try this code right now:
KubeVirt v0.3.0-alpha.3 is the most recent alpha release and should work fairly well.
More
But these items were just a small fraction of what we have been doing.
If you look at the kubevirt org on GitHub you will notice many more repositories there, covering storage, cockpit, and deployment with ansible - and it will be another post to write about how all of this is fitting together.
Welcome aboard!
KubeVirt is really speeding up and we are still looking for support. So if you are interested in working on a bleeding edge project tightly coupled with Kubernetes, but also having it’s own notion, and an great team, then just reach out to me.
::: {#footer} [ February 23rd, 2018 12:06pm ]{#timestamp} [kubevirt]{.tag} [kubernetes]{.tag} [libvirt]{.tag} [fedora]{.tag} [virtualization]{.tag} :::