Fabian Deutsch, Red Hat, FrOSCon, 2017
(saomik, CC BY-NC-ND 2.0)
(drome, CC BY-NC 2.0)
(davehamster, CC BY 2.0)
"Versatile, scalable, hyped, community driven, devops, …"
Take this with a grain of salt.
(colinwarren, CC BY-NC 2.0)
Technology? Features? Feeling? Tools? Requirements?
Yes
No
Replace?
(teflon, CC BY-NC-ND 2.0)
(coreyann, CC BY-ND 2.0)
Management Plane
Storage
Network
…
Virtual Machines
Management Plane
Storage
Network
…
Virtual Machines
Management Plane
Storage
Network
…
Containers
Management Plane
Storage
Network
…
Virtual Machines
Management Plane
Storage
Network
…
Containers
on the same infrastructure.
Management Plane
Storage
Network
…
Virtual Machines
Containers
Management Plane
Storage
Network
…
Virtual Machines
Containers
Management Plane
Storage
Network
…
Virtual Machines
Containers
Tell me more.
(image source: giphy)
Kubernetes
Storage
Network
…
Virtual Machines
Containers
Kubernetes
Storage
Network
…
Virtual Machines
Containers
+ KubeVirt
libvirt, … everything in pods
New resource type for VMs
Operator pattern to manage VMs
VMs live inside pods
Native Kubernetes add-on
API server with VM functionality
Declarative, like everything else
Kubernetes' infrastructure is leveraged
⇝
⇝
⇝
⇝
(tabor-roeder, CC BY 2.0)
$ kubectl create -f pod.yaml
$ kubectl create -f vm.yaml
apiVersion: kubevirt.io/v1alpha1
kind: VM
metadata:
name: testvm
spec:
domain:
devices:
graphics:
- type: spice
video:
- type: qxl
disks:
- type: network
snapshot: external
device: disk
driver:
name: qemu
type: raw
cache: none
source:
host:
name: iscsi-demo-target.default
port: "3260"
protocol: iscsi
name: iqn.2017-01.io.kubevirt:sn.42/2
target:
dev: vda
consoles:
- type: pty
memory:
unit: MB
value: 64
$ minikube start --vm-driver kvm --network-plugin cni
$ git clone -b froscon-2017 \
https://github.com/fabiand/kubevirt-demo.git
$ cd kubevirt-demo
$ bash run-mini-demo.sh
$ bash run-mini-demo.sh
# Deploying KubeVirt
...
vm "testvm" created
Waiting for KubeVirt to be ready ...
Waiting for KubeVirt to be ready ...
Waiting for KubeVirt to be ready ...
# KubeVirt is now ready. Try:
# $ kubectl get vms
$ kubectl get vms
NAME KIND
testvm VM.v1alpha1.kubevirt.io
$ kubectl get pods
NAME READY STATUS RESTARTS AGE
haproxy-723816479-wcblm 1/1 Running 1 49s
iscsi-demo-target-tgtd-1270025779-nckbh 1/1 Running 0 48s
libvirt-8zj1k 2/2 Running 0 48s
spice-proxy-3525077118-fswn9 1/1 Running 0 47s
virt-api-1956313626-t9rhj 1/1 Running 0 46s
virt-controller-2251532855-tfm9f 1/1 Running 0 45s
virt-handler-s7g76 1/1 Running 0 43s
virt-launcher-testvm-----q05vh 1/1 Running 0 38s
virt-manifest-1665692876-cs8wp 2/2 Running 0 42s
$ kubectl exec -it libvirt-8zj1k bash
Defaulting container name to libvirtd.
Use 'kubectl describe pod/libvirt-8zj1k' to see all of the containers in this pod.
# virsh list
Id Name State
----------------------------------------------------
1 default_testvm running
# exit
Thank you.
Learn and contribute at http://kubevirt.io