Fabian Deutsch, Red Hat
devconf.cz, 2017
@dummdida - dummida.tumblr.com
https://www.flickr.com/photos/infinitelydigital/3763912574/
"Oh! I deleted the VM. Argh."
"Oh - I deleted a container?"
Container Cluster
VM Cluster
Strongest point: The assumptions about them differ
Container Cluster
VM Cluster
Container Cluster
VM Cluster
Scheduling ~ Storage ~ Network ~ Host life-cycle
… they have much in common: Infrastructure.
Cluster, Schedule, Storage, Network, …
Even if the workload is different, can both workloads share the same infrastructure?
Let's see how we can run both workloads on the same infra. Would allow sharing.
Container and VM Cluster
Scheduling ~ Storage ~ Network ~ Host life-cycle
Try: Don't run a pod but a pet VM instead
Keep everything Kubernetes, just replace the launcher
Let's see pods as VM representations and let's get the kubelet to launch VMs.
Representation: Inadequat
Handling: Ugly
(Fail)
Representation + Handling
$ kubectl create -f - <<EOF
kind: VM
apiVersion: kubevirt.io/v1alpha1
metadata:
name: testvm
spec:
nodeSelector:
kubernetes.io/hostname: master
domain:
devices:
interfaces:
- source:
network: default
type: network
video:
- model:
type: qxl
heads: 1
graphics:
- autoPort: 'yes'
defaultMode: any
type: spice
memory:
unit: KiB
value: 8192
os:
type:
os: hvm
type: qemu
Watch for VMs, create associated pod: Ability to reuse pod features.
Handle virtualization specific cluster tasks: live-migration
Handle virtualization functionality on the node side.
Responsible for launching VMs.
Pet VMs can not be handled by Kubernetes.
Kubernetes has a core assumption of stateless workloads - this shines through everywhere.
Some functionality is missing - live migration.
Needs to be extended.
Kubernetes
virt-controller
VM (TPR)
.
.
virt-handler
VM
kubelet
Cluster
Host
Pod
Pod
Pod
Kubernetes
virt-controller
VMSpec (TPR)
Pod Spec
.
.
virt-handler
VM
$ curl run.kubevirt.io/demo.sh | bash
Everywhere.
Design allows us to solve in Kubernetes if it can be solved there.
Otherwise workaround/bypass in Controllers and Daemons
http://kubevirt.io
@kubevirt
irc: fabiand
fabiand@redhat.com
@dummdida
Join the KubeVirt Gathering on
Saturday, 12 noon, C236