<p>To my understanding <a href="https://kubernetes.io" rel="nofollow noreferrer">Kubernetes</a> is a container orchestration service comparable to <a href="https://aws.amazon.com/ecs/" rel="nofollow noreferrer">AWS ECS</a> or <a href="https://docs.docker.com/engine/swarm/" rel="nofollow noreferrer">Docker Swarm</a>. Yet there are several <a href="https://stackoverflow.com/questions/32047563/kubernetes-vs-cloudfoundry/32238148">high rated questions</a> on stackoverflow that compare it to <a href="https://www.cloudfoundry.org" rel="nofollow noreferrer">CloudFoundry</a> which is a plattform orchestration service. </p>

<p>This means that CloudFoundry can take care of the VM layer, updating and provisioning VMs while moving containers avoiding downtime. Therefore the comparison to Kubernetes makes limited sense to my understanding. </p>

<p>Am I misunderstanding something, does Kubernetes support provisioning and managing the VM layer too?</p>

<p>As for <strong>VM</strong>, my answer is <strong>YES</strong>; you can run VM as workload in k8s cluster.</p>

<p>Indeed, Redhat team figured out how to run VM in the kubernetes cluster by adding the patch <a href="https://kubevirt.io/docs/workloads/controllers/virtualmachine.html" rel="nofollow noreferrer">KubeVirt</a>.</p>

<p>example from the link above.</p>

<pre><code>apiVersion: kubevirt.io/v1alpha2
kind: VirtualMachine
metadata:
  creationTimestamp: null
  labels:
    kubevirt.io/vm: vm-cirros
  name: vm-cirros
spec:
  running: false
  template:
    metadata:
      creationTimestamp: null
      labels:
        kubevirt.io/vm: vm-cirros
    spec:
      domain:
        devices:
          disks:
          - disk:
              bus: virtio
            name: registrydisk
            volumeName: registryvolume
          - disk:
              bus: virtio
            name: cloudinitdisk
            volumeName: cloudinitvolume
        machine:
          type: ""
        resources:
          requests:
            memory: 64M
      terminationGracePeriodSeconds: 0
      volumes:
      - name: registryvolume
        registryDisk:
          image: kubevirt/cirros-registry-disk-demo:latest
      - cloudInitNoCloud:
          userDataBase64: IyEvYmluL3NoCgplY2hvICdwcmludGVkIGZyb20gY2xvdWQtaW5pdCB1c2VyZGF0YScK
        name: cloudinitvolume
</code></pre>

<p>Then: </p>

<pre><code>kubectl create -f vm.yaml
virtualmachine "vm-cirros" created
</code></pre>
