SlideShare ist ein Scribd-Unternehmen logo
1 von 33
Downloaden Sie, um offline zu lesen
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

Weitere ähnliche Inhalte

Was ist angesagt?

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
 

Was ist angesagt? (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
 

Ähnlich wie 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
 

Ähnlich wie 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
 

Kürzlich hochgeladen

Business Analyzopedia - Your Pocket Gita for Business Analysis
Business Analyzopedia - Your Pocket Gita for Business AnalysisBusiness Analyzopedia - Your Pocket Gita for Business Analysis
Business Analyzopedia - Your Pocket Gita for Business AnalysisDEEPRAJ PATHAK
 
Understanding Plagiarism: Causes, Consequences and Prevention.pptx
Understanding Plagiarism: Causes, Consequences and Prevention.pptxUnderstanding Plagiarism: Causes, Consequences and Prevention.pptx
Understanding Plagiarism: Causes, Consequences and Prevention.pptxSasikiranMarri
 
Transform your Corporate Strategy Office - Harness OnePlan’s Strategic Portfo...
Transform your Corporate Strategy Office - Harness OnePlan’s Strategic Portfo...Transform your Corporate Strategy Office - Harness OnePlan’s Strategic Portfo...
Transform your Corporate Strategy Office - Harness OnePlan’s Strategic Portfo...OnePlan Solutions
 
full course of software engineering mid term.pdf
full course of software engineering mid term.pdffull course of software engineering mid term.pdf
full course of software engineering mid term.pdfAbdul salam
 
Introduction to Firebase Workshop Slides
Introduction to Firebase Workshop SlidesIntroduction to Firebase Workshop Slides
Introduction to Firebase Workshop Slidesvaideheekore1
 
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics
 
2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shardsChristopher Curtin
 
Advantages of Cargo Cloud Solutions.pptx
Advantages of Cargo Cloud Solutions.pptxAdvantages of Cargo Cloud Solutions.pptx
Advantages of Cargo Cloud Solutions.pptxRTS corp
 
What is Mendix and the concept of low-code development.docx
What is Mendix and the concept of low-code development.docxWhat is Mendix and the concept of low-code development.docx
What is Mendix and the concept of low-code development.docxTechnogeeks
 
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4jGraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4jNeo4j
 
Explore the Three Main Types of Logistics - Inbound Logistics, Outbound Logis...
Explore the Three Main Types of Logistics - Inbound Logistics, Outbound Logis...Explore the Three Main Types of Logistics - Inbound Logistics, Outbound Logis...
Explore the Three Main Types of Logistics - Inbound Logistics, Outbound Logis...Piyovi
 
Strategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsStrategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsJean Silva
 
Mastering Project Planning with Microsoft Project 2016.pptx
Mastering Project Planning with Microsoft Project 2016.pptxMastering Project Planning with Microsoft Project 2016.pptx
Mastering Project Planning with Microsoft Project 2016.pptxAS Design & AST.
 
AmsterdamJUG April 2024 - Going serverless with Quarkus GraalVM native images...
AmsterdamJUG April 2024 - Going serverless with Quarkus GraalVM native images...AmsterdamJUG April 2024 - Going serverless with Quarkus GraalVM native images...
AmsterdamJUG April 2024 - Going serverless with Quarkus GraalVM native images...Bert Jan Schrijver
 
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...Bert Jan Schrijver
 
oracle 23c new features for developer and dba
oracle 23c new features for developer and dbaoracle 23c new features for developer and dba
oracle 23c new features for developer and dbaRemote DBA Services
 
Zer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdfZer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdfmaor17
 
What’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 UpdatesWhat’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 UpdatesVictoriaMetrics
 
Santander Stream Processing with Apache Flink
Santander Stream Processing with Apache FlinkSantander Stream Processing with Apache Flink
Santander Stream Processing with Apache Flinkconfluent
 
[ CNCF Q1 2024 ] Intro to Continuous Profiling and Grafana Pyroscope.pdf
[ CNCF Q1 2024 ] Intro to Continuous Profiling and Grafana Pyroscope.pdf[ CNCF Q1 2024 ] Intro to Continuous Profiling and Grafana Pyroscope.pdf
[ CNCF Q1 2024 ] Intro to Continuous Profiling and Grafana Pyroscope.pdfSteve Caron
 

Kürzlich hochgeladen (20)

Business Analyzopedia - Your Pocket Gita for Business Analysis
Business Analyzopedia - Your Pocket Gita for Business AnalysisBusiness Analyzopedia - Your Pocket Gita for Business Analysis
Business Analyzopedia - Your Pocket Gita for Business Analysis
 
Understanding Plagiarism: Causes, Consequences and Prevention.pptx
Understanding Plagiarism: Causes, Consequences and Prevention.pptxUnderstanding Plagiarism: Causes, Consequences and Prevention.pptx
Understanding Plagiarism: Causes, Consequences and Prevention.pptx
 
Transform your Corporate Strategy Office - Harness OnePlan’s Strategic Portfo...
Transform your Corporate Strategy Office - Harness OnePlan’s Strategic Portfo...Transform your Corporate Strategy Office - Harness OnePlan’s Strategic Portfo...
Transform your Corporate Strategy Office - Harness OnePlan’s Strategic Portfo...
 
full course of software engineering mid term.pdf
full course of software engineering mid term.pdffull course of software engineering mid term.pdf
full course of software engineering mid term.pdf
 
Introduction to Firebase Workshop Slides
Introduction to Firebase Workshop SlidesIntroduction to Firebase Workshop Slides
Introduction to Firebase Workshop Slides
 
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
 
2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards
 
Advantages of Cargo Cloud Solutions.pptx
Advantages of Cargo Cloud Solutions.pptxAdvantages of Cargo Cloud Solutions.pptx
Advantages of Cargo Cloud Solutions.pptx
 
What is Mendix and the concept of low-code development.docx
What is Mendix and the concept of low-code development.docxWhat is Mendix and the concept of low-code development.docx
What is Mendix and the concept of low-code development.docx
 
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4jGraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
 
Explore the Three Main Types of Logistics - Inbound Logistics, Outbound Logis...
Explore the Three Main Types of Logistics - Inbound Logistics, Outbound Logis...Explore the Three Main Types of Logistics - Inbound Logistics, Outbound Logis...
Explore the Three Main Types of Logistics - Inbound Logistics, Outbound Logis...
 
Strategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsStrategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero results
 
Mastering Project Planning with Microsoft Project 2016.pptx
Mastering Project Planning with Microsoft Project 2016.pptxMastering Project Planning with Microsoft Project 2016.pptx
Mastering Project Planning with Microsoft Project 2016.pptx
 
AmsterdamJUG April 2024 - Going serverless with Quarkus GraalVM native images...
AmsterdamJUG April 2024 - Going serverless with Quarkus GraalVM native images...AmsterdamJUG April 2024 - Going serverless with Quarkus GraalVM native images...
AmsterdamJUG April 2024 - Going serverless with Quarkus GraalVM native images...
 
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
 
oracle 23c new features for developer and dba
oracle 23c new features for developer and dbaoracle 23c new features for developer and dba
oracle 23c new features for developer and dba
 
Zer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdfZer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdf
 
What’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 UpdatesWhat’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 Updates
 
Santander Stream Processing with Apache Flink
Santander Stream Processing with Apache FlinkSantander Stream Processing with Apache Flink
Santander Stream Processing with Apache Flink
 
[ CNCF Q1 2024 ] Intro to Continuous Profiling and Grafana Pyroscope.pdf
[ CNCF Q1 2024 ] Intro to Continuous Profiling and Grafana Pyroscope.pdf[ CNCF Q1 2024 ] Intro to Continuous Profiling and Grafana Pyroscope.pdf
[ CNCF Q1 2024 ] Intro to Continuous Profiling and Grafana Pyroscope.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