SlideShare a Scribd company logo
1 of 33
Download to read offline
1
KubeVirt: Converge IT Infra into one
single k8s platform
Kedar Bidarkar
@kbidarka
Senior Quality Engineer @ Red Hat
2
Agenda
●Why KubeVirt?
●What is KubeVirt?
●Basic KubeVirt objects and components
●Deployment and management Virtual Machines
●KubeVirt Storage
●KubeVirt Networking
●Q & A
3
Currently
●We have On-premises solutions like Openstack, oVirt
●We have public clouds AWS, GCP, Azure.
●So why KubeVirt and why VM management stuff again?
4
Infrastructure Convergence
Old way... Multiple Workloads - Multiple Stacks
VM Workload
VM Platform
Operating System
Bare Metal
Container Workload
Kubernetes
Operating System
Bare Metal
Scheduling, Storage, Network
Logging, Metrics, Monitoring
Knowledge
2x
5
Infrastructure Convergence
KubeVirt way… Multiple Workloads - Single stack
Container Workload
Kubernetes
Operating System
Bare Metal
VM Workload
Logging, Metrics, Monitoring
Knowledge
Scheduling, Storage, Network
1x
6
Infrastructure Convergence
●Environments will coexist over time
–Many new workloads will move to containers.
–But virtualization will still remain for foreseeable future.
●Business reasons ( cost, time to market, app towards EOL )
●Technical reasons ( custom kernel, hard-to-containerize apps )
●Unified infra, should be easier to maintain, operate and reduce costs.
●Migration Path: Migration of workloads from VM to Containers will be on same Infra.
●VMs can benefit from kubernetes concepts (load balancing, rolling deployment, etc.)
7
What is KubeVirt?
KubeVirt is a Kubernetes addon and enables scheduling of
traditional VM workloads side by side with container
workloads on Kubernetes.
–https://kubevirt.io/
●Makes use of Custom Resource Definitions(CRD) and bunch
of controllers
–A custom resource is an extension of k8s API, not available by default
with k8s.
●Extends existing k8s clusters by providing set of Virt APIs.
●Works by running libvirt (KVM) in a container
8
KubeVirt Installation
●Pre-requisites:
–Kubectl
–Minikube
●https://github.com/kubevirt/demo
9
Benefits with KubeVirt
●Drops directly into existing Kubernetes Clusters
–No additional host setup required
–Manage VMs like pods
●Enables a transition path where vms can make use of k8s
–Infra, tools and Management
●Hard to containerize apps can be deployed in k8s as VM’s.
●Lowers the entry load for migration. No need to containerize app before migrating.
●Provides infra convergence and workflow convergence.
10
KubeVirt architecture
11
Components of KubeVirt
●Virt-operator: Handles install, removal and upgrade of kubeVirt application.
●Virt-api: apiserver ( validation, defaults of VMs and entry point for all Virt flows)
●Virt-controller: controller-manager ( where all the controllers and logic lives )
●Virt-handler: Kubelet ( node daemon, managing VMIs which run inside Pods, which are managed by
kubelet)
●Virt-launcher: ( Provides cgroups and namespaces. For every VMI object one pod is created and uses a
local libvirt instance)
12
KubeVirt Objects
13
Virtual Machine Instance
●VMI is a running VM.
●Virtual Machine Instance have their own kind.
●scheduled as pods and live inside the pods.
●Applications within VMI are exposed using service.
–Example: virtctl expose vmi vmi-fedora-cdisk --name vmiservice --port
27017 --target-port 22
–ssh cirros@172.30.3.149 -p 27017
Example:
apiVersion: kubevirt.io/v1alpha3
kind: VirtualMachineInstance
metadata:
labels:
special: vmi-fedora-cdisk
name: vmi-fedora-cdisk
spec:
domain:
devices:
disks:
- disk: {}
name: containerdisk
machine:
type: "q35"
resources:
requests:
memory: 1Gi
volumes:
- name: containerdisk
image: kubevirt/fedora-cloud-container-disk-demo
14
Create a new VMI
15
Where do I find the domxml files
16
Virtual Machine
Virtual Machine provides additional management
capabilities to VirtualMachineInstance inside the cluster.
–Start/Stop/Restart
–Offline configuration change
apiVersion: kubevirt.io/v1alpha3
kind: VirtualMachine
metadata:
labels:
kubevirt-vm: vm-fedora-cdisk
name: vm-fedora-cdisk
spec:
running: false
template:
metadata:
labels:
kubevirt-vm: vm-fedora-cdisk
<VMI spec here>
spec:
domain:
devices:
disks:
- disk: {}
name: containerdisk
resources:
requests:
memory: 1Gi
volumes:
- containerDisk:
image: kubevirt/fedora-cloud-container-disk-demo
name: containerdisk
17
Create a new Virtual Machine
18
VM mgmt with virtctl
●Kubectl still used for basic VMI operations, virtctl binary required for advanced features such as :
–Serial and graphical console access.
–Start, Stop and Restart Vms.
●Virtctl is deployed and used from the client side.
–Typical virtctl commands:
●Virtctl stop testvm
●Virtctl restart testvm
●Virtctl console testvm
●Virtctl vnc testvm
19
KubeVirt Storage
20
containerDisk
●Disks are pulled from container registry and reside on local node
hosting the VMs.
●They are ephemeral storage devices
●Push VM disks to container registry using KubeVirt base container
image kubevirt/container-disk-v1alpha
Example:
metadata:
name: testvmi-containerdisk
apiVersion: kubevirt.io/v1alpha3
kind: VirtualMachineInstance
spec:
domain:
resources:
requests:
memory: 64M
devices:
disks:
- name: containerdisk
disk: {}
volumes:
- name: containerdisk
containerDisk:
image: vmidisks/fedora25:latest
cat << END > Dockerfile
FROM kubevirt/container-disk-v1alpha
ADD fedora25.qcow2 /disk
END
docker build -t vmidisks/fedora25:latest .
docker push vmidisks/fedora25:latest
21
Containerized Data Importer
●Persistent storage mgmt add-on for k8s.
●Primary goal is to build VM disks on PVCs for KubeVirt VMs.
●Use cases:
–Import disk image from a URL to PVC ( HTTP/S3)
–Upload a local disk image to a PVC
–Clone an existing PVC
22
persistentVolumeClaim
●Used when VMI disk needs to persist after the VM terminates.
–Suitable when persistent storage is required.
●A PV can be in Filesystem or block mode.
–Filesystem: Disk must be named disk.img and placed under root path.
–Block: For consuming raw block devices (Block Volume feature gate)
Example:
metadata:
name: testvmi-pvc
apiVersion: kubevirt.io/v1alpha3
kind: VirtualMachineInstance
spec:
domain:
resources:
requests:
memory: 64M
devices:
disks:
- name: fedora-standard-6g
disk: {}
volumes:
- name: mypvcdisk
persistentVolumeClaim:
claimName: fedora-standard-6g
23
DataVolume
●DataVolume is a custom resource provided by the Containerized Data Importer (CDI) project.
●DataVolume provides integration between KubeVirt and CDI, it automates both PVC creation and
importing of a VM disk on PVC during the VM launch flow.
●VM is NOT SCHEDULED until the DataVolume is in success state.
24
DataVolume Example
dataVolumeTemplates:
- metadata:
name: fedora-datavolume
spec:
pvc:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 6Gi
source:
http:
Url: https://download.example.com/Fedora29-1.1.x86_64.qcow2
Example:
apiVersion: kubevirt.io/v1alpha3
kind: VirtualMachineInstance
metadata:
labels:
special: vmi-fedora-datavolume
name: vmi-fedora-datavolume
spec:
domain:
devices:
disks:
- disk: {}
name: datavolumedisk1
machine:
type: "q35"
resources:
requests:
memory: 2048M
volumes:
- name: datavolumedisk1
dataVolume:
name: fedora-datavolume
25
KubeVirt Networking
26
KubeVirt Networking
●Connecting a VM to networks consists of two parts.
●Interface defines a virtual network interface of a VM, which is frontend
●A network specifies the backend of an interface
●Each interface must have a corresponding network with same name.
Example:
kind: VirtualMachineInstance
spec:
domain:
devices:
interfaces:
- name: default
bridge: {}
networks:
- name: default
pod: {} # Stock pod network
27
KubeVirt Networking
●Virtual Machines are connected to regular pod network.
●From the outside no difference between a VM and a pod.
●KubeVirt does not bring additional network plugins.
–But allows to utilize existing plugins.
28
Network Interfaces (frontend)
●Describe properties of virtual interfaces as seen inside VM instance.
●Each interface should declare its type:
–Bridge ( default )
–masquerade
–sriov
–slirp ( non production )
29
Network Types ( Backend )
Example:
kind: VM
spec:
domain:
devices:
interfaces:
- name: default
bridge: {}
- name: ovs-net
bridge: {}
networks:
- name: default
pod: {} # Stock pod network
- name: ovs-net
multus: # Secondary multus network
networkName: ovs-vlan-100
●Each network should declare its type:
–Pod – Default k8s network
–Multus – secondary network
–Genie – secondary network
●The networkName need to match the
networkAttachementDefinition object name.
Example:
apiVersion: "k8s.cni.cncf.io/v1"
kind: NetworkAttachmentDefinition
metadata:
name: ovs-vlan-100
spec:
config: '{
"cniVersion": "0.3.1",
"type": "ovs",
"bridge": "br1",
"vlan": 100
}'
30
Other KubeVirt Features
●Live Migration:
–Migration to other compute nodes.
●KubeVirt web-ui:
–Extension of the OpenShift Console for Virtualization View.
–https://github.com/kubevirt/web-ui-operator
●Foreman KubeVirt Plugin
–Kubevirt as compute resource for Foreman
– https://github.com/theforeman/foreman_kubevirt
31
Collaboration
●Website:
–https://kubevirt.io/
●GitHub:
–https://github.com/kubevirt/
●Mailing list:
–https://groups.google.com/forum/#!forum/kubevirt-dev
●Slack:
–https://kubernetes.slack.com/messages/virtualization
●IRC:
–#kubevirt on irc.freenode.net
32
Q & A
33
Thank You

More Related Content

What's hot

Extended and embedding: containerd update & project use cases
Extended and embedding: containerd update & project use casesExtended and embedding: containerd update & project use cases
Extended and embedding: containerd update & project use casesPhil Estes
 
Introducing Koki Short
Introducing Koki ShortIntroducing Koki Short
Introducing Koki ShortSidhartha Mani
 
Deep Dive into Kubernetes - Part 1
Deep Dive into Kubernetes - Part 1Deep Dive into Kubernetes - Part 1
Deep Dive into Kubernetes - Part 1Imesh Gunaratne
 
Kubernetes 101 for Beginners
Kubernetes 101 for BeginnersKubernetes 101 for Beginners
Kubernetes 101 for BeginnersOktay Esgul
 
Multitenancy in WSO2 Carbon 5 (C5)
Multitenancy in WSO2 Carbon 5 (C5)Multitenancy in WSO2 Carbon 5 (C5)
Multitenancy in WSO2 Carbon 5 (C5)Imesh Gunaratne
 
WSO2Con ASIA 2016: WSO2 Cloud Strategy Update
WSO2Con ASIA 2016: WSO2 Cloud Strategy UpdateWSO2Con ASIA 2016: WSO2 Cloud Strategy Update
WSO2Con ASIA 2016: WSO2 Cloud Strategy UpdateWSO2
 
Kubernetes deep dive - - Huawei 2015-10
Kubernetes deep dive - - Huawei 2015-10Kubernetes deep dive - - Huawei 2015-10
Kubernetes deep dive - - Huawei 2015-10Vishnu Kannan
 
Platform Orchestration with Kubernetes and Docker
Platform Orchestration with Kubernetes and DockerPlatform Orchestration with Kubernetes and Docker
Platform Orchestration with Kubernetes and DockerJulian Strobl
 
Scaling docker with kubernetes
Scaling docker with kubernetesScaling docker with kubernetes
Scaling docker with kubernetesLiran Cohen
 
Revolutionizing WSO2 PaaS with Kubernetes & App Factory
Revolutionizing WSO2 PaaS with Kubernetes & App FactoryRevolutionizing WSO2 PaaS with Kubernetes & App Factory
Revolutionizing WSO2 PaaS with Kubernetes & App FactoryImesh Gunaratne
 
K8s in 3h - Kubernetes Fundamentals Training
K8s in 3h - Kubernetes Fundamentals TrainingK8s in 3h - Kubernetes Fundamentals Training
K8s in 3h - Kubernetes Fundamentals TrainingPiotr Perzyna
 
Introduction of private cloud in LINE - OpenStack最新情報セミナー(2019年2月)
Introduction of private cloud in LINE - OpenStack最新情報セミナー(2019年2月)Introduction of private cloud in LINE - OpenStack最新情報セミナー(2019年2月)
Introduction of private cloud in LINE - OpenStack最新情報セミナー(2019年2月)VirtualTech Japan Inc.
 
Hands-On Introduction to Kubernetes at LISA17
Hands-On Introduction to Kubernetes at LISA17Hands-On Introduction to Kubernetes at LISA17
Hands-On Introduction to Kubernetes at LISA17Ryan Jarvinen
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetesMichal Cwienczek
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetesGöksel Pırnal
 
Immutable kubernetes architecture by linuxkit
Immutable kubernetes architecture by linuxkitImmutable kubernetes architecture by linuxkit
Immutable kubernetes architecture by linuxkit어형 이
 
Kubernetes: An Introduction to the Open Source Container Orchestration Platform
Kubernetes: An Introduction to the Open Source Container Orchestration PlatformKubernetes: An Introduction to the Open Source Container Orchestration Platform
Kubernetes: An Introduction to the Open Source Container Orchestration PlatformMichael O'Sullivan
 
Understanding Kubernetes
Understanding KubernetesUnderstanding Kubernetes
Understanding KubernetesTu Pham
 
Commit to excellence - Java in containers
Commit to excellence - Java in containersCommit to excellence - Java in containers
Commit to excellence - Java in containersRed Hat Developers
 

What's hot (20)

Extended and embedding: containerd update & project use cases
Extended and embedding: containerd update & project use casesExtended and embedding: containerd update & project use cases
Extended and embedding: containerd update & project use cases
 
Introducing Koki Short
Introducing Koki ShortIntroducing Koki Short
Introducing Koki Short
 
Deep Dive into Kubernetes - Part 1
Deep Dive into Kubernetes - Part 1Deep Dive into Kubernetes - Part 1
Deep Dive into Kubernetes - Part 1
 
Kubernetes 101 for Beginners
Kubernetes 101 for BeginnersKubernetes 101 for Beginners
Kubernetes 101 for Beginners
 
Multitenancy in WSO2 Carbon 5 (C5)
Multitenancy in WSO2 Carbon 5 (C5)Multitenancy in WSO2 Carbon 5 (C5)
Multitenancy in WSO2 Carbon 5 (C5)
 
WSO2Con ASIA 2016: WSO2 Cloud Strategy Update
WSO2Con ASIA 2016: WSO2 Cloud Strategy UpdateWSO2Con ASIA 2016: WSO2 Cloud Strategy Update
WSO2Con ASIA 2016: WSO2 Cloud Strategy Update
 
Kubernetes deep dive - - Huawei 2015-10
Kubernetes deep dive - - Huawei 2015-10Kubernetes deep dive - - Huawei 2015-10
Kubernetes deep dive - - Huawei 2015-10
 
Platform Orchestration with Kubernetes and Docker
Platform Orchestration with Kubernetes and DockerPlatform Orchestration with Kubernetes and Docker
Platform Orchestration with Kubernetes and Docker
 
Scaling docker with kubernetes
Scaling docker with kubernetesScaling docker with kubernetes
Scaling docker with kubernetes
 
Revolutionizing WSO2 PaaS with Kubernetes & App Factory
Revolutionizing WSO2 PaaS with Kubernetes & App FactoryRevolutionizing WSO2 PaaS with Kubernetes & App Factory
Revolutionizing WSO2 PaaS with Kubernetes & App Factory
 
K8s in 3h - Kubernetes Fundamentals Training
K8s in 3h - Kubernetes Fundamentals TrainingK8s in 3h - Kubernetes Fundamentals Training
K8s in 3h - Kubernetes Fundamentals Training
 
Introduction of private cloud in LINE - OpenStack最新情報セミナー(2019年2月)
Introduction of private cloud in LINE - OpenStack最新情報セミナー(2019年2月)Introduction of private cloud in LINE - OpenStack最新情報セミナー(2019年2月)
Introduction of private cloud in LINE - OpenStack最新情報セミナー(2019年2月)
 
Hands-On Introduction to Kubernetes at LISA17
Hands-On Introduction to Kubernetes at LISA17Hands-On Introduction to Kubernetes at LISA17
Hands-On Introduction to Kubernetes at LISA17
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetes
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetes
 
Immutable kubernetes architecture by linuxkit
Immutable kubernetes architecture by linuxkitImmutable kubernetes architecture by linuxkit
Immutable kubernetes architecture by linuxkit
 
Kubernetes: An Introduction to the Open Source Container Orchestration Platform
Kubernetes: An Introduction to the Open Source Container Orchestration PlatformKubernetes: An Introduction to the Open Source Container Orchestration Platform
Kubernetes: An Introduction to the Open Source Container Orchestration Platform
 
Understanding Kubernetes
Understanding KubernetesUnderstanding Kubernetes
Understanding Kubernetes
 
Commit to excellence - Java in containers
Commit to excellence - Java in containersCommit to excellence - Java in containers
Commit to excellence - Java in containers
 
GPU Acceleration for Containers on Intel Processor Graphics
GPU Acceleration for Containers on Intel Processor GraphicsGPU Acceleration for Containers on Intel Processor Graphics
GPU Acceleration for Containers on Intel Processor Graphics
 

Similar to OSDC 2019 | KubeVirt: Converge IT infrastructure into one single Kubernetes platform by Kedar Bidarkar

Kubernetes Administration from Zero to Hero.pdf
Kubernetes Administration from Zero to Hero.pdfKubernetes Administration from Zero to Hero.pdf
Kubernetes Administration from Zero to Hero.pdfArzooGupta16
 
OSS Japan 2019 service mesh bridging Kubernetes and legacy
OSS Japan 2019 service mesh bridging Kubernetes and legacyOSS Japan 2019 service mesh bridging Kubernetes and legacy
OSS Japan 2019 service mesh bridging Kubernetes and legacySteve Wong
 
Unikernels: Rise of the Library Hypervisor
Unikernels: Rise of the Library HypervisorUnikernels: Rise of the Library Hypervisor
Unikernels: Rise of the Library HypervisorAnil Madhavapeddy
 
Unikernels: the rise of the library hypervisor in MirageOS
Unikernels: the rise of the library hypervisor in MirageOSUnikernels: the rise of the library hypervisor in MirageOS
Unikernels: the rise of the library hypervisor in MirageOSDocker, Inc.
 
Kubernetes based Cloud-region support in ONAP to bring up VM and container ba...
Kubernetes based Cloud-region support in ONAP to bring up VM and container ba...Kubernetes based Cloud-region support in ONAP to bring up VM and container ba...
Kubernetes based Cloud-region support in ONAP to bring up VM and container ba...Victor Morales
 
Kubernetes - Starting with 1.2
Kubernetes  - Starting with 1.2Kubernetes  - Starting with 1.2
Kubernetes - Starting with 1.2William Stewart
 
OpenStack and OpenContrail for FreeBSD platform by Michał Dubiel
OpenStack and OpenContrail for FreeBSD platform by Michał DubielOpenStack and OpenContrail for FreeBSD platform by Michał Dubiel
OpenStack and OpenContrail for FreeBSD platform by Michał Dubieleurobsdcon
 
Dayta AI Seminar - Kubernetes, Docker and AI on Cloud
Dayta AI Seminar - Kubernetes, Docker and AI on CloudDayta AI Seminar - Kubernetes, Docker and AI on Cloud
Dayta AI Seminar - Kubernetes, Docker and AI on CloudJung-Hong Kim
 
Deploying windows containers with kubernetes
Deploying windows containers with kubernetesDeploying windows containers with kubernetes
Deploying windows containers with kubernetesBen Hall
 
Turning Virtual Machines Cloud-Native using KubeVirt
Turning Virtual Machines Cloud-Native using KubeVirtTurning Virtual Machines Cloud-Native using KubeVirt
Turning Virtual Machines Cloud-Native using KubeVirtSuman Chakraborty
 
网易云K8S应用实践 | practices for kubernetes cluster provisioning, management and ap...
网易云K8S应用实践 | practices for kubernetes cluster provisioning, management and ap...网易云K8S应用实践 | practices for kubernetes cluster provisioning, management and ap...
网易云K8S应用实践 | practices for kubernetes cluster provisioning, management and ap...Xiaohui Chen
 
Successful K8S Platforms in Airgapped Environments
Successful K8S Platforms in Airgapped EnvironmentsSuccessful K8S Platforms in Airgapped Environments
Successful K8S Platforms in Airgapped EnvironmentsKubernetesCommunityD
 
DevNetCreate - ACI and Kubernetes Integration
DevNetCreate - ACI and Kubernetes IntegrationDevNetCreate - ACI and Kubernetes Integration
DevNetCreate - ACI and Kubernetes IntegrationHank Preston
 
Creating Kubernetes multi clusters with ClusterAPI @ Stuttgart Kubernetes Meetup
Creating Kubernetes multi clusters with ClusterAPI @ Stuttgart Kubernetes MeetupCreating Kubernetes multi clusters with ClusterAPI @ Stuttgart Kubernetes Meetup
Creating Kubernetes multi clusters with ClusterAPI @ Stuttgart Kubernetes MeetupTobias Schneck
 
Container network security
Container network securityContainer network security
Container network securityDaisuke Nakajima
 
Kubernetes for the VI Admin
Kubernetes for the VI AdminKubernetes for the VI Admin
Kubernetes for the VI AdminKendrick Coleman
 
Windows 與 Azure 的容器旅程 @ Skilltree Day
Windows 與 Azure 的容器旅程 @ Skilltree DayWindows 與 Azure 的容器旅程 @ Skilltree Day
Windows 與 Azure 的容器旅程 @ Skilltree DayJeff Chu
 

Similar to OSDC 2019 | KubeVirt: Converge IT infrastructure into one single Kubernetes platform by Kedar Bidarkar (20)

Kubernetes Administration from Zero to Hero.pdf
Kubernetes Administration from Zero to Hero.pdfKubernetes Administration from Zero to Hero.pdf
Kubernetes Administration from Zero to Hero.pdf
 
OSS Japan 2019 service mesh bridging Kubernetes and legacy
OSS Japan 2019 service mesh bridging Kubernetes and legacyOSS Japan 2019 service mesh bridging Kubernetes and legacy
OSS Japan 2019 service mesh bridging Kubernetes and legacy
 
Unikernels: Rise of the Library Hypervisor
Unikernels: Rise of the Library HypervisorUnikernels: Rise of the Library Hypervisor
Unikernels: Rise of the Library Hypervisor
 
Unikernels: the rise of the library hypervisor in MirageOS
Unikernels: the rise of the library hypervisor in MirageOSUnikernels: the rise of the library hypervisor in MirageOS
Unikernels: the rise of the library hypervisor in MirageOS
 
Kubernetes based Cloud-region support in ONAP to bring up VM and container ba...
Kubernetes based Cloud-region support in ONAP to bring up VM and container ba...Kubernetes based Cloud-region support in ONAP to bring up VM and container ba...
Kubernetes based Cloud-region support in ONAP to bring up VM and container ba...
 
Kubernetes - Starting with 1.2
Kubernetes  - Starting with 1.2Kubernetes  - Starting with 1.2
Kubernetes - Starting with 1.2
 
OpenStack and OpenContrail for FreeBSD platform by Michał Dubiel
OpenStack and OpenContrail for FreeBSD platform by Michał DubielOpenStack and OpenContrail for FreeBSD platform by Michał Dubiel
OpenStack and OpenContrail for FreeBSD platform by Michał Dubiel
 
Dayta AI Seminar - Kubernetes, Docker and AI on Cloud
Dayta AI Seminar - Kubernetes, Docker and AI on CloudDayta AI Seminar - Kubernetes, Docker and AI on Cloud
Dayta AI Seminar - Kubernetes, Docker and AI on Cloud
 
Deploying windows containers with kubernetes
Deploying windows containers with kubernetesDeploying windows containers with kubernetes
Deploying windows containers with kubernetes
 
Turning Virtual Machines Cloud-Native using KubeVirt
Turning Virtual Machines Cloud-Native using KubeVirtTurning Virtual Machines Cloud-Native using KubeVirt
Turning Virtual Machines Cloud-Native using KubeVirt
 
网易云K8S应用实践 | practices for kubernetes cluster provisioning, management and ap...
网易云K8S应用实践 | practices for kubernetes cluster provisioning, management and ap...网易云K8S应用实践 | practices for kubernetes cluster provisioning, management and ap...
网易云K8S应用实践 | practices for kubernetes cluster provisioning, management and ap...
 
Successful K8S Platforms in Airgapped Environments
Successful K8S Platforms in Airgapped EnvironmentsSuccessful K8S Platforms in Airgapped Environments
Successful K8S Platforms in Airgapped Environments
 
DevNetCreate - ACI and Kubernetes Integration
DevNetCreate - ACI and Kubernetes IntegrationDevNetCreate - ACI and Kubernetes Integration
DevNetCreate - ACI and Kubernetes Integration
 
Kubernetes
KubernetesKubernetes
Kubernetes
 
Creating Kubernetes multi clusters with ClusterAPI @ Stuttgart Kubernetes Meetup
Creating Kubernetes multi clusters with ClusterAPI @ Stuttgart Kubernetes MeetupCreating Kubernetes multi clusters with ClusterAPI @ Stuttgart Kubernetes Meetup
Creating Kubernetes multi clusters with ClusterAPI @ Stuttgart Kubernetes Meetup
 
Demystfying container-networking
Demystfying container-networkingDemystfying container-networking
Demystfying container-networking
 
Container network security
Container network securityContainer network security
Container network security
 
Kubernetes Basics
Kubernetes BasicsKubernetes Basics
Kubernetes Basics
 
Kubernetes for the VI Admin
Kubernetes for the VI AdminKubernetes for the VI Admin
Kubernetes for the VI Admin
 
Windows 與 Azure 的容器旅程 @ Skilltree Day
Windows 與 Azure 的容器旅程 @ Skilltree DayWindows 與 Azure 的容器旅程 @ Skilltree Day
Windows 與 Azure 的容器旅程 @ Skilltree Day
 

Recently uploaded

Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Clustering techniques data mining book ....
Clustering techniques data mining book ....Clustering techniques data mining book ....
Clustering techniques data mining book ....ShaimaaMohamedGalal
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 

Recently uploaded (20)

Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Clustering techniques data mining book ....
Clustering techniques data mining book ....Clustering techniques data mining book ....
Clustering techniques data mining book ....
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 

OSDC 2019 | KubeVirt: Converge IT infrastructure into one single Kubernetes platform by Kedar Bidarkar

  • 1. 1 KubeVirt: Converge IT Infra into one single k8s platform Kedar Bidarkar @kbidarka Senior Quality Engineer @ Red Hat
  • 2. 2 Agenda ●Why KubeVirt? ●What is KubeVirt? ●Basic KubeVirt objects and components ●Deployment and management Virtual Machines ●KubeVirt Storage ●KubeVirt Networking ●Q & A
  • 3. 3 Currently ●We have On-premises solutions like Openstack, oVirt ●We have public clouds AWS, GCP, Azure. ●So why KubeVirt and why VM management stuff again?
  • 4. 4 Infrastructure Convergence Old way... Multiple Workloads - Multiple Stacks VM Workload VM Platform Operating System Bare Metal Container Workload Kubernetes Operating System Bare Metal Scheduling, Storage, Network Logging, Metrics, Monitoring Knowledge 2x
  • 5. 5 Infrastructure Convergence KubeVirt way… Multiple Workloads - Single stack Container Workload Kubernetes Operating System Bare Metal VM Workload Logging, Metrics, Monitoring Knowledge Scheduling, Storage, Network 1x
  • 6. 6 Infrastructure Convergence ●Environments will coexist over time –Many new workloads will move to containers. –But virtualization will still remain for foreseeable future. ●Business reasons ( cost, time to market, app towards EOL ) ●Technical reasons ( custom kernel, hard-to-containerize apps ) ●Unified infra, should be easier to maintain, operate and reduce costs. ●Migration Path: Migration of workloads from VM to Containers will be on same Infra. ●VMs can benefit from kubernetes concepts (load balancing, rolling deployment, etc.)
  • 7. 7 What is KubeVirt? KubeVirt is a Kubernetes addon and enables scheduling of traditional VM workloads side by side with container workloads on Kubernetes. –https://kubevirt.io/ ●Makes use of Custom Resource Definitions(CRD) and bunch of controllers –A custom resource is an extension of k8s API, not available by default with k8s. ●Extends existing k8s clusters by providing set of Virt APIs. ●Works by running libvirt (KVM) in a container
  • 9. 9 Benefits with KubeVirt ●Drops directly into existing Kubernetes Clusters –No additional host setup required –Manage VMs like pods ●Enables a transition path where vms can make use of k8s –Infra, tools and Management ●Hard to containerize apps can be deployed in k8s as VM’s. ●Lowers the entry load for migration. No need to containerize app before migrating. ●Provides infra convergence and workflow convergence.
  • 11. 11 Components of KubeVirt ●Virt-operator: Handles install, removal and upgrade of kubeVirt application. ●Virt-api: apiserver ( validation, defaults of VMs and entry point for all Virt flows) ●Virt-controller: controller-manager ( where all the controllers and logic lives ) ●Virt-handler: Kubelet ( node daemon, managing VMIs which run inside Pods, which are managed by kubelet) ●Virt-launcher: ( Provides cgroups and namespaces. For every VMI object one pod is created and uses a local libvirt instance)
  • 13. 13 Virtual Machine Instance ●VMI is a running VM. ●Virtual Machine Instance have their own kind. ●scheduled as pods and live inside the pods. ●Applications within VMI are exposed using service. –Example: virtctl expose vmi vmi-fedora-cdisk --name vmiservice --port 27017 --target-port 22 –ssh cirros@172.30.3.149 -p 27017 Example: apiVersion: kubevirt.io/v1alpha3 kind: VirtualMachineInstance metadata: labels: special: vmi-fedora-cdisk name: vmi-fedora-cdisk spec: domain: devices: disks: - disk: {} name: containerdisk machine: type: "q35" resources: requests: memory: 1Gi volumes: - name: containerdisk image: kubevirt/fedora-cloud-container-disk-demo
  • 15. 15 Where do I find the domxml files
  • 16. 16 Virtual Machine Virtual Machine provides additional management capabilities to VirtualMachineInstance inside the cluster. –Start/Stop/Restart –Offline configuration change apiVersion: kubevirt.io/v1alpha3 kind: VirtualMachine metadata: labels: kubevirt-vm: vm-fedora-cdisk name: vm-fedora-cdisk spec: running: false template: metadata: labels: kubevirt-vm: vm-fedora-cdisk <VMI spec here> spec: domain: devices: disks: - disk: {} name: containerdisk resources: requests: memory: 1Gi volumes: - containerDisk: image: kubevirt/fedora-cloud-container-disk-demo name: containerdisk
  • 17. 17 Create a new Virtual Machine
  • 18. 18 VM mgmt with virtctl ●Kubectl still used for basic VMI operations, virtctl binary required for advanced features such as : –Serial and graphical console access. –Start, Stop and Restart Vms. ●Virtctl is deployed and used from the client side. –Typical virtctl commands: ●Virtctl stop testvm ●Virtctl restart testvm ●Virtctl console testvm ●Virtctl vnc testvm
  • 20. 20 containerDisk ●Disks are pulled from container registry and reside on local node hosting the VMs. ●They are ephemeral storage devices ●Push VM disks to container registry using KubeVirt base container image kubevirt/container-disk-v1alpha Example: metadata: name: testvmi-containerdisk apiVersion: kubevirt.io/v1alpha3 kind: VirtualMachineInstance spec: domain: resources: requests: memory: 64M devices: disks: - name: containerdisk disk: {} volumes: - name: containerdisk containerDisk: image: vmidisks/fedora25:latest cat << END > Dockerfile FROM kubevirt/container-disk-v1alpha ADD fedora25.qcow2 /disk END docker build -t vmidisks/fedora25:latest . docker push vmidisks/fedora25:latest
  • 21. 21 Containerized Data Importer ●Persistent storage mgmt add-on for k8s. ●Primary goal is to build VM disks on PVCs for KubeVirt VMs. ●Use cases: –Import disk image from a URL to PVC ( HTTP/S3) –Upload a local disk image to a PVC –Clone an existing PVC
  • 22. 22 persistentVolumeClaim ●Used when VMI disk needs to persist after the VM terminates. –Suitable when persistent storage is required. ●A PV can be in Filesystem or block mode. –Filesystem: Disk must be named disk.img and placed under root path. –Block: For consuming raw block devices (Block Volume feature gate) Example: metadata: name: testvmi-pvc apiVersion: kubevirt.io/v1alpha3 kind: VirtualMachineInstance spec: domain: resources: requests: memory: 64M devices: disks: - name: fedora-standard-6g disk: {} volumes: - name: mypvcdisk persistentVolumeClaim: claimName: fedora-standard-6g
  • 23. 23 DataVolume ●DataVolume is a custom resource provided by the Containerized Data Importer (CDI) project. ●DataVolume provides integration between KubeVirt and CDI, it automates both PVC creation and importing of a VM disk on PVC during the VM launch flow. ●VM is NOT SCHEDULED until the DataVolume is in success state.
  • 24. 24 DataVolume Example dataVolumeTemplates: - metadata: name: fedora-datavolume spec: pvc: accessModes: - ReadWriteOnce resources: requests: storage: 6Gi source: http: Url: https://download.example.com/Fedora29-1.1.x86_64.qcow2 Example: apiVersion: kubevirt.io/v1alpha3 kind: VirtualMachineInstance metadata: labels: special: vmi-fedora-datavolume name: vmi-fedora-datavolume spec: domain: devices: disks: - disk: {} name: datavolumedisk1 machine: type: "q35" resources: requests: memory: 2048M volumes: - name: datavolumedisk1 dataVolume: name: fedora-datavolume
  • 26. 26 KubeVirt Networking ●Connecting a VM to networks consists of two parts. ●Interface defines a virtual network interface of a VM, which is frontend ●A network specifies the backend of an interface ●Each interface must have a corresponding network with same name. Example: kind: VirtualMachineInstance spec: domain: devices: interfaces: - name: default bridge: {} networks: - name: default pod: {} # Stock pod network
  • 27. 27 KubeVirt Networking ●Virtual Machines are connected to regular pod network. ●From the outside no difference between a VM and a pod. ●KubeVirt does not bring additional network plugins. –But allows to utilize existing plugins.
  • 28. 28 Network Interfaces (frontend) ●Describe properties of virtual interfaces as seen inside VM instance. ●Each interface should declare its type: –Bridge ( default ) –masquerade –sriov –slirp ( non production )
  • 29. 29 Network Types ( Backend ) Example: kind: VM spec: domain: devices: interfaces: - name: default bridge: {} - name: ovs-net bridge: {} networks: - name: default pod: {} # Stock pod network - name: ovs-net multus: # Secondary multus network networkName: ovs-vlan-100 ●Each network should declare its type: –Pod – Default k8s network –Multus – secondary network –Genie – secondary network ●The networkName need to match the networkAttachementDefinition object name. Example: apiVersion: "k8s.cni.cncf.io/v1" kind: NetworkAttachmentDefinition metadata: name: ovs-vlan-100 spec: config: '{ "cniVersion": "0.3.1", "type": "ovs", "bridge": "br1", "vlan": 100 }'
  • 30. 30 Other KubeVirt Features ●Live Migration: –Migration to other compute nodes. ●KubeVirt web-ui: –Extension of the OpenShift Console for Virtualization View. –https://github.com/kubevirt/web-ui-operator ●Foreman KubeVirt Plugin –Kubevirt as compute resource for Foreman – https://github.com/theforeman/foreman_kubevirt