Anyone try to run vm for production on a Kubernetes cluster. Is their a way to run kvm instance inside a pod ? I know that google run all the vm inside container is it planned for kubernetes ? Thank you
-
this project is interesting : [Rancher VM](http://rancher.com/introducing-ranchervm-package-and-run-virtual-machines-as-docker-containers/) – Dubs Nov 30 '15 at 14:33
5 Answers
Running VMs inside(!) Kubernetes can have legitimate use cases.
The most native way as of recently to run VMs and manage them in Kubernetes is sing rkt. You can then use rkt's (L)KVM stage1 to run containers as VMs.
For your use case you would want something like an "empty" container with a Linux for your customers most probably, so it would still be different from actually running VM images, but maybe there's a work around there.
Another cool use case for running and managing several Kubernetes instances inside VMs managed again by Kubernetes. This way you could build fully-isolated multi-tenancy Kubernetes clusters.

- 311
- 1
- 5
Another option is KubeVirt: https://github.com/kubevirt/
An add-on to Kubernetes to run virtual machines, in the sense of classical virtual machines, as you can run them on VMWare, oVirt, OpenStack.
The goal is to support migration of (currently) virtual machine workloads to containers, as well as having the ability to keep workloads virtualized if needed - but keep them close (as in: on) the container infrasturcture.
KubeVirt provides an explicit API around virtualization features, see https://kubevirt.gitbooks.io/user-guide/.
Only nit, it's still pretty much in WIP, should be usable soon tho.

- 21
- 1
It seems you can run kvm in docker.
But I would not use this in production.
Also, try to understand the difference between a container and a vm. There are reasons why you would want to use containers, which are very different then why you would want to run a vm. Most notable is that in a container you will want to run one application and only one.
-
We offer app to customer on container already, but some of them want vm, and the idea is that kubernetes handle them ( network, ressources, storage, ... ) as Google do I think. – Dubs Nov 27 '15 at 23:45
-
It will not be the same thing. The vm will need an other ip then the one from container and all the other overhead than a vm requires. – cristi Nov 28 '15 at 08:53
You can refer the following links on the topic:
if you use Rancher with kuberentes, you can turn on KVM in an environemnt. and then create VMs as well as run K8s on the same infrastructure.
Rancher.com/kubernetes

- 61
- 2