Convergence of VM and containers orchestration using KubeVirt. Chunfu Wen

Similar documents
RUNNING VIRTUAL MACHINES ON KUBERNETES. Roman Mohr & Fabian Deutsch, Red Hat, KVM Forum, 2017

INTRODUCING CONTAINER-NATIVE VIRTUALIZATION

Kubernetes - Load Balancing For Virtual Machines (Pods)

Backup strategies for Stateful Containers in OpenShift Using Gluster based Container-Native Storage

WHEN CONTAINERS AND VIRTUALIZATION DO - AND DON T - WORK TOGETHER

Red Hat Roadmap for Containers and DevOps

TEN LAYERS OF CONTAINER SECURITY. Kirsten Newcomer Security Strategist

Amir Zipory Senior Solutions Architect, Redhat Israel, Greece & Cyprus

Red Hat Atomic Details Dockah, Dockah, Dockah! Containerization as a shift of paradigm for the GNU/Linux OS

TEN LAYERS OF CONTAINER SECURITY

S Implementing DevOps and Hybrid Cloud

Kuber-what?! Learn about Kubernetes

Important DevOps Technologies (3+2+3days) for Deployment

Taming your heterogeneous cloud with Red Hat OpenShift Container Platform.

Red Hat OpenShift Roadmap Q4 CY16 and H1 CY17 Releases. Lutz Lange Solution

RED HAT GLUSTER TECHSESSION CONTAINER NATIVE STORAGE OPENSHIFT + RHGS. MARCEL HERGAARDEN SR. SOLUTION ARCHITECT, RED HAT BENELUX April 2017

Learn. Connect. Explore.

Introduction to Kubernetes Storage Primitives for Stateful Workloads

/ Cloud Computing. Recitation 5 February 14th, 2017

OpenShift Container Platform 3.11

Cloud & container monitoring , Lars Michelsen Check_MK Conference #4

CONTAINERS AND MICROSERVICES WITH CONTRAIL

Scheduling in Kubernetes October, 2017

ViryaOS RFC: Secure Containers for Embedded and IoT. A proposal for a new Xen Project sub-project

OPENSTACK Building Block for Cloud. Ng Hwee Ming Principal Technologist (Telco) APAC Office of Technology

How Container Runtimes matter in Kubernetes?

Managing Compute and Storage at Scale with Kubernetes. Dan Paik / Google

Running MarkLogic in Containers (Both Docker and Kubernetes)

AGILE RELIABILITY WITH RED HAT IN THE CLOUDS YOUR SOFTWARE LIFECYCLE SPEEDUP RECIPE. Lutz Lange - Senior Solution Architect Red Hat

Managing and Protecting Persistent Volumes for Kubernetes. Xing Yang, Huawei and Jay Bryant, Lenovo

OpenShift Hyper-Converged Infrastructure Bare Metal Deployment with Containerized Gluster

Container in Production : Openshift 구축사례로 이해하는 PaaS. Jongjin Lim Specialist Solution Architect, AppDev

/ Cloud Computing. Recitation 5 September 26 th, 2017

The Path to GPU as a Service in Kubernetes Renaud Gaubert Lead Kubernetes Engineer

Go Faster: Containers, Platforms and the Path to Better Software Development (Including Live Demo)

Container Orchestration on Amazon Web Services. Arun

ACCELERATE APPLICATION DELIVERY WITH OPENSHIFT. Siamak Sadeghianfar Sr Technical Marketing Manager, April 2016

OpenShift Roadmap Enterprise Kubernetes for Developers. Clayton Coleman, Architect, OpenShift

CoreOS and Red Hat. Reza Shafii Joe Fernandes Brandon Philips Clayton Coleman May 2018

Accelerate at DevOps Speed With Openshift v3. Alessandro Vozza & Samuel Terburg Red Hat

Secure Kubernetes Container Workloads

Bitnami s Kubernetes Projects Leverage Application delivery on Next Generation Platforms

PRP Distributed Kubernetes Cluster

OpenShift 3 Technical Architecture. Clayton Coleman, Dan McPherson Lead Engineers

Investigating Containers for Future Services and User Application Support

CS-580K/480K Advanced Topics in Cloud Computing. Container III

Container-Native Storage

OPENSHIFT 3.7 and beyond

Container Management : First Looks

More Containers, More Problems

Red Hat JBoss Middleware for OpenShift 3

DevOps Technologies. for Deployment

Container Pods with Docker Compose in Apache Mesos

TEN LAYERS OF CONTAINER SECURITY

Hitachi & Red Hat collaborate: Container migration guide

Introduction to the Open Service Broker API. Doug Davis

Przyspiesz tworzenie aplikacji przy pomocy Openshift Container Platform. Jarosław Stakuń Senior Solution Architect/Red Hat CEE

Kubernetes on Openstack

You Have Stateful Apps - What if Kubernetes Would Also Run Your Storage?

Introduction to Kubernetes

Above the clouds with container-native storage

Kubernetes Integration with Virtuozzo Storage

OpenShift + Container Native Storage (CNS)

Taming Distributed Pets with Kubernetes

Code: Slides:

Disclaimer This presentation may contain product features that are currently under development. This overview of new technology represents no commitme

Multi-Arch Layered Image Build System

Docker and Oracle Everything You Wanted To Know

TRAINING AND CERTIFICATION UPDATE

The speed of containers, the security of VMs. KataContainers.io

ovirt and Docker Integration

Overview of Container Management

A day in the life of a log message Kyle Liberti, Josef

State of OpenShift on Bare Metal

This document (including, without limitation, any product roadmap or statement of direction data) illustrates the planned testing, release and

Kubernetes made easy with Docker EE. Patrick van der Bleek Sr. Solutions Engineer NEMEA

Kubernetes deep dive

Using DC/OS for Continuous Delivery

What s New in Red Hat OpenShift Container Platform 3.4. Torben Jäger Red Hat Solution Architect

ASP.NET Core & Docker

ROBIN SYSTEMS. Containerizing Oracle: Not Thinking About It Yet? You Should Be!!!

Open Service Broker API: Creating a Cross-Platform Standard Doug Davis IBM Shannon Coen Pivotal

Implementing SaaS on Kubernetes

Stackube Documentation

Deployment Patterns using Docker and Chef

Disclaimer This presentation may contain product features that are currently under development. This overview of new technology represents no commitme

RED HAT'S CONTAINER STRATEGY. Lars Herrmann General Manager, RHEL, RHEV and Containers June 24, 2015

DevOps + Infrastructure TRACK SUPPORTED BY

Openshift: Key to modern DevOps

Kubernetes The Path to Cloud Native

Microservices. Chaos Kontrolle mit Kubernetes. Robert Kubis - Developer Advocate,

Red Hat Containers Roadmap. Red Hat A panel of product directors

The speed of containers, the security of VMs

WHITE PAPER. RedHat OpenShift Container Platform. Benefits: Abstract. 1.1 Introduction

DevOps Course Content

Developing Kubernetes Services

Kubernetes 101. Doug Davis, STSM September, 2017

Security oriented OpenShift within regulated environments

개발자와운영자를위한 DevOps 플랫폼 OpenShift Container Platform. Hyunsoo Senior Solution Architect 07.Feb.2017

An Introduction to Kubernetes

Transcription:

Convergence of VM and containers orchestration using KubeVirt Chunfu Wen chwen@redhat.com

Agenda Context Introduction What Is Kubevirt And How It Feel Kubevirt Architecture And Design Demo

FIRST A LITTLE HISTORY Virtual Machines

FIRST A LITTLE HISTORY A Virtual Machines Containers

Virtualization VS Containers VS VM virtualizes the hardware container isolates the process

VIRTUAL MACHINES VS CONTAINERS Virtual Machine Container Application Application Bins/Libs Bins/Libs Guest OS Container Host Each of these attributes can be a positive or a negative for a given workload. Increasingly organizations have a mix of both. #LC3

EXISTING SYSTEMS TREAT THESE SEPARATELY Container Virtual Machine Virtual Machine Container RHEL RHEL RHEL Physical Machine Physical Machine Physical Machine

WHAT ABOUT EXISTING WORKLOADS? A CONTAINER INFRASTRUCTURE AND ORCHESTRATION Container Application and Kubernetes orchestration as provided by OpenShift are becoming the standard for new applications. VIRTUALIZED WORKLOADS Virtualized Workloads are not going anywhere fast! Business reasons (cost, time to market) and technical reasons (older/different operating system) CONVERGING INFRASTRUCTURE How can we bring these two worlds closer together?

So,if. VMS are just user processes VM and containers already share some isolation technologies,selinux and cgroup Kubernetes manage clustered containers,which are user processes Get a converged infrastructure A

Concept of Proof Pod Container Replace Container Virtual Machine

One Typical Benefit Scenario Windows guest VM access containerized mysql Pod Service Virtual Machine MySql Container

OpenShift = Enterprise K8s + Docker Build, Deploy and Manage Containerized Apps CONTAINER CONTAINER CONTAINER CONTAINER CONTAINER SELF-SERVICE SERVICE CATALOG (LANGUAGE RUNTIMES, MIDDLEWARE, DATABASES, ) BUILD AUTOMATION APPLICATION LIFECYCLE MANAGEMENT (CI / CD) DEPLOYMENT AUTOMATION CONTAINER ORCHESTRATION & CLUSTER MANAGEMENT (KUBERNETES) NETWORKING STORAGE REGISTRY LOGS & METRICS INFRASTRUCTURE AUTOMATION & COCKPIT SECURITY OCI CONTAINER RUNTIME & PACKAGING ATOMIC HOST / RED HAT ENTERPRISE LINUX

Enter kubevirt Kubenest+Libvirt? Virtual Machine management addon to Kubernetes that extends Kubernetes in a way that allows it to schedule VM workloads side by side with container workloads.

Explore more Extends OpenShift/Kubernetes to support orchestration of virtual machine workloads alongside application container workloads in the same cluster. Developer centric approach to virtualization that drops directly into existing Openshift/Kubernetes clusters Implemented as a CustomResouceDefinition Aims to provide as Kubernetes-native an experience to working with VMs As possible Integrates directly with other Kubernetes concepts (like Persistent Volumes, Pod networking) Manager virtual machines like Pods! Scheduling, networking, and storage are all delegated to Kubernetes, while KubeVirt provides the virtualization functionality

How Kubevirt Feel?

FIrst Look At Pod Object kind: Pod metadata: name: nginx labels: name: nginx spec: containers: - name: nginx image: nginx:latest ports: - containerport: 80 nodeselector: cpu: fast status: phase: Running What is a Pod? A pod (as in a pod of whales or pea pod) is a group of one or more containers (such as Docker containers), with shared storage/network, and a specification for how to run the containers. * * https://kubernetes.io/docs/concepts/workloads/pods/pod/#what-is-a-pod

The VirtualMachine Object kind: VirtualMachine metadata: name: testvm spec: domain: devices: type: PersistentVolumeClaim device: disk source: name: myvolumeclaim nodeselector: cpu: fast status: phase: Running We have the typical Pod like structure: Metadata section Specification section Typical Pod features like nodeselector affinity Status section Behind the scene a Pod is created, scheduled and we make sure that the VM starts correctly inside.

CustomResourceDefinition:vm-resource.yaml apiversion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition metadata: creationtimestamp: null labels: kubevirt.io: "" name: virtualmachines.kubevirt.io spec: group: kubevirt.io names: kind: VirtualMachine plural: virtualmachines shortnames: - vm - vms singular: virtualmachine scope: Namespaced validation: CustomResourceDefinition Extend the Kubernetes API: create a new CustomResourceDefinition (CRD), the Kubernetes API Server reacts by creating a new RESTful resource path After the CustomResourceDefinition object has been created, you can create custom objects. Custom objects can contain custom fields

The Typical Kubectl Feeling kind: VirtualMachine metadata: name: testvm spec: domain: devices: graphics: - type: spice consoles: - type: pty Typical Pod commands: kubectl create -f mypodspec.yaml kubectl delete mypod kubectl exec mypod -it /bin/bash Typical Virtual Machine commands: kubectl create -f myvmspec.yaml kubectl delete testvm kubectl plugin virt console testvm kubectl plugin virt spice testvm

Architecture

Kubevirt Architecture Internal

Components(1/5) virt-controller: This controller is responsible for monitoring the VM (CRDs) and managing the associated pods. Currently the controller will make sure to create and manage the life-cycle of the pods associated to the VM objects. A VM object will always be associated to a pod during it's life-time, however, due to i.e. migration of a VM the pod instance might change over time.

Components(2/5) VM (CRD): Machine type CPU type Amount of RAM and vcpus Number and type of NICs

Components(3/5) virt-launcher: For every VM object one pod is created. This pod's primary container runs the virt-launcher KubeVirt component. Virt launcher will take care to launch a VM process for every pod which is associated to a VM object whenever it is getting scheduled on a host. The main purpose of the virt-launcher Pod is to provide the cgroups and namespaces, which will be used to host the VM process. Virt-handler signals virt-launcher to start a VM by passing the VM's CRD object to virt-launcher. virt-launcher then uses a local libvirtd instance within its container to start the VM. From there virt-launcher monitors the VM process and terminates once the VM has exited.

Components(4/5) virt-handler: Every host needs a single instance of virt-handler. It can be delivered as a DaemonSet. Virt-handler is also reactive and is watching for changes of the VM object, once detected it will perform all necessary operations to change a VM to meet the required state. Report domain state and spec changes to the cluster. LC3

Components(5/5) libvirtd: An instance of libvirtd is present in every VM pod. virt-launcher uses libvirtd to manage the life-cycle of the VM process.. LC3

DEMO LC3

Deep dive into it LC3

Workflow: Create and Delete a VM LC3

Sequences A client posts a new VM definition to the K8s API Server. The K8s API Server validates the input and creates a VM custom resource definition (CRD) object. The virt-controller observes the creation of the new VM object and creates a corresponding pod. Kubernetes is scheduling the pod on a host. The virt-controller observes that a pod for the VM got started and updates the nodename field in VM object. After the nodename is set, the responsibility transitions to the virt-handler for any further action. The virt-handler observes that a VM got assigned to host where it is running on. The virt-handler is using the VM Specification and signals the creation of the corresponding domain using a libvirtd instance in the VM's pod. A client deletes the VM object through the virt-api-server. The virt-handler observes the deletion and turns off the domain. LC3

Leveraging K8s Functionality: network, storage and computing

Computing apiversion: kubevirt.io/v1alpha1 kind: VirtualMachine metadata: creationtimestamp: null name: vm-windows spec: domain:. cpu: cores: 2 resources: requests: memory: 64M Cores specify vcpu in VM Memory specify required memory

Networking func SetupDefaultPodNetwork(domain *api.domain) error {... reparepodnetworkinterfaces(vif, podniclink); // Start DHCP Server... go Handler.StartDHCP(vif, fakeserveraddr)... } SetupDefaultPodNetwork will prepare the pod management network to be used by a virtual machine Virtual machine will own the pod network IP and MAC. Pods MAC address will be changed to a random address and IP will be deleted. DHCP server will be started and bounded to the macvlan interface to server the original pod ip to the guest OS https://github.com/kubevirt/kubevirt/blob/master/docs/libvirt-pod-networking.md LC3

Disk apiversion: kubevirt.io/v1alpha1 kind: VirtualMachine... domain:... devices: disks: - disk: bus: virtio name: pvcdisk volumename: pvcvolume... volumes: - name: pvcvolume persistentvolumeclaim: claimname: disk-vpc... Virtual Machines are able to have disks attached. They are not always required, but have some value if you need to persist data. Kubernetes provides persistent storage through Persistent Volumes and Claims

Call for KubeVirt participants GitHub: https://github.com/kubevirt/kubevirt https://lc32018.sched.com/event/eraw/convergence-of-vir tual-machines-and-containers-orchestration-using-kubevirtchunfu-wen-red-hat?iframe=yes&w=100%&sidebar=yes&bg =no# Mailing List: https://groups.google.com/forum/#!forum/kubevirt-dev IRC: #kubevirt on irc.freenode.net

THANK YOU Chunfu Wen- 温春福 chwen@redhat.com