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

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.


Solution 1:

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.

  • [1] https://issuetracker.google.com/issues/110507927
  • [2] https://cloud.google.com/compute/docs/instances/nested-virtualization/overview