Score:2

Is there any possibility of making Kubevirt work on GKE to orchestrate VMs using Kubernetes?

de flag

Assuming that a solution requires a mix of about 70% components running in containers, and 30% (legacy, monoliths, many dependencies, too hard/too expensive to containerize) in VMs, is there a way to manage the VMs via kubevirt when everything is deployed on GKE (well the containers certainly are, while the VMs are on GCP computes, ideally in same availability zone as where the GKE worker nodes are).

The key reason for wanting to use Kubevirt is to be able to treat all resources as K8s resources and orchestrated using K8s.

Is there a way to make this work on GKE, where as a user one is operating within constraints of a managed K8s CaaS ? Any pointers or guidance in this regard would be very helpful.

Score:3
hk flag
SYN

KubeVirt relies on nested virtualization. In addition to enabling virt instructions at the BIOS level of physical servers, guests need to load their kvm_intel (or kvm_adm) module with special options.

This feature is planned [1], though it's been for a while and I don't see anything that would suggest it's going to be implemented any time soon

Now, GCE does offer such an option [2]. If you really need KubeVirt, you may look into deploying your own Kubernetes cluster on top of GCE, without going through GKE.

de flag
Thanks @SYN. I had indeed read that KubeVirt relied on nested virtualization when used on Minikube or Kind, but for production deployments isn't it so that KubeVirt could allow Kubernetes to orchestrate VMs on baremetals as well ? At least, that is roughly what I remember reading about Kubevirt when I came across it about a year back. From Google cloud standpoint then, it might simply mean getting a GCE compute node implement the Kubevirt agents (just a conjecture of how K8s would manage a VM like a pod). Or I might have been mistaken.
SYN avatar
hk flag
SYN
KubeVirt relies on nested virtualization whenever your Kubernetes cluster/kubelet agent are running from a virtual machine - as GCE/GKE, qemu/kvm, ... Otherwise, you would only need to enable virtualization instructions in your BIOS.
SYN avatar
hk flag
SYN
As to "how would k8s manage a VM like a pod": the kubevirt controller would schedule Pods based on your VirtualMachines, with a container image that runs qemu/kvm, starting a guest into your Pod, setting up the plumbing: SDN, volume attachments, ... A kubevirt daemonset would tell kube-scheduler which of your nodes are eligible (can use virt instructions). If you can register GCE compute notes to your GKE cluster (is this doable ?), go ahead. May be easier to configure the OS / kvm module loading options
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.