Introduction to Kubernetes Storage Primitives for Stateful Workloads

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

Kubernetes Storage: Current Capabilities and Future Opportunities. September 25, 2018 Saad Ali & Nikhil Kasinadhuni Google

What s New in Kubernetes 1.10

Raw Block Volume in Kubernetes Mitsuhiro Tanino, Principal Software Engineer, Hitachi Vantara

Webinar Series. Cloud Native Storage. May 17, 2017

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

Internals of Docking Storage with Kubernetes Workloads

PRP Distributed Kubernetes Cluster

Container-Native Storage

Above the clouds with container-native storage


So, I have all these containers! Now what?

Kubernetes, Persistent Volumes and the Pure Service Orchestrator. Simon Dodsley, Director of New Stack Technologies

Red Hat Enterprise Linux Atomic Host 7 Getting Started with Kubernetes

Kubernetes Basics. Christoph Stoettner Meetup Docker Mannheim #kubernetes101

An Introduction to Kubernetes

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

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

Scaling Jenkins with Docker and Kubernetes Carlos

Local Ephemeral Storage Resource Management. Jing Xu, Google

@briandorsey #kubernetes #GOTOber

OpenShift + Container Native Storage (CNS)

Kubernetes on Openstack

CONTINUOUS INTEGRATION CONTINUOUS DELIVERY

Kubernetes: What s New

Declarative Modeling for Cloud Deployments

Kubernetes: Container Orchestration and Micro-Services logo

Disaster Recovery and Data Protection for Kubernetes Persistent Volumes. Xing Yang, Principal Architect, Huawei

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

Kubernetes Integration with Virtuozzo Storage

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

DEVELOPER INTRO

Designing MQ deployments for the cloud generation

Code: Slides:

Kubernetes: Twelve KeyFeatures

Convergence of VM and containers orchestration using KubeVirt. Chunfu Wen

INTRODUCING CONTAINER-NATIVE VIRTUALIZATION

TensorFlow on vivo

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

McAfee Cloud Workload Security Installation Guide. (McAfee epolicy Orchestrator)

Kubernetes 1.9 Features and Future

Kubernetes 101. Doug Davis, STSM September, 2017

Red Hat Gluster Storage 3.1

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

Hitachi & Red Hat collaborate: Container migration guide

Delivering Kubernetes Apps with Helm. Michelle Adnan Adam

Package your Java Application using Docker and Kubernetes. Arun

Cloud & container monitoring , Lars Michelsen Check_MK Conference #4

agenda PAE Docker Docker PAE

VMWARE PIVOTAL CONTAINER SERVICE

What s New in K8s 1.3

What s New in K8s 1.3

Kubernetes The Path to Cloud Native

How Container Schedulers and Software-based Storage will Change the Cloud

Red Hat Roadmap for Containers and DevOps

Container Orchestration on Amazon Web Services. Arun

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

Learn. Connect. Explore.

Blue elephant on-demand: PostgreSQL + Kubernetes. FOSDEM 2018, Brussels

gcp / gke / k8s microservices

Infoblox IPAM Driver for Kubernetes User's Guide

Integrate Ceph and Kubernetes. on Wiwynn ST P. All-Flash Storage

Evolution of Kubernetes in One Year From Technical View

EDB Postgres Containers and Integration with OpenShift. Version 1.0

Infoblox IPAM Driver for Kubernetes. Page 1

/ Cloud Computing. Recitation 5 September 26 th, 2017

Cisco Virtual Update Container networking. Hans Donnerborg, Lars Granberg, Maj 2018

Kubernetes. An open platform for container orchestration. Johannes M. Scheuermann. Karlsruhe,

Kubernetes objects on Microsoft Azure

Taming Distributed Pets with Kubernetes

/ Cloud Computing. Recitation 5 February 14th, 2017

Kubernetes. Introduction

Kuber-what?! Learn about Kubernetes

Data Transfer on a Container. Nadya Williams University of California San Diego

VMWARE ENTERPRISE PKS

Persistent Storage with Kubernetes in Production Which solution and why?

State of OpenShift on Bare Metal

Xen and CloudStack. Ewan Mellor. Director, Engineering, Open-source Cloud Platforms Citrix Systems

ASP.NET Core & Docker

Continuous delivery while migrating to Kubernetes

CONTAINERS AND MICROSERVICES WITH CONTRAIL

Kubernetes deep dive

Weiting Chen Zhen Fan

VMWARE PKS. What is VMware PKS? VMware PKS Architecture DATASHEET

Running MarkLogic in Containers (Both Docker and Kubernetes)

Kuberiter White Paper. Kubernetes. Cloud Provider Comparison Chart. Lawrence Manickam Kuberiter Inc

DevOps Technologies. for Deployment

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

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

Cloud I - Introduction

Creating a Multi-Container Pod

Choosing the Right Container Infrastructure for Your Organization

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

Amazon EC2 Container Service: Manage Docker-Enabled Apps in EC2

Stackube Documentation

Bright Cluster Manager: Using the NVIDIA NGC Deep Learning Containers

All you need to know about OpenStack Block Storage in less than an hour. Dhruv Bhatnagar NirendraAwasthi

Persistent Storage with Docker in production - Which solution and why?

Kubernetes, CNCF and Beyond

Kubernetes 1.8 and Beyond

Transcription:

September 12, 2017 Introduction to Kubernetes Storage Primitives for Stateful Workloads Saad Ali Google @the_saad_ali Chris Duchesne {code} @ChrisDuchesne

Agenda Presentation Quick intro to Kubernetes (and Pods and ReplicaSets) What are Kubernetes Volumes Introduce Kubernetes Primitives Demo What s next for Kubernetes Storage? Q&A You try the demo!

What is Kubernetes Greek for Helmsman ; also the root of the word Governor Container orchestrator Supports multiple container runtimes (including Docker) Supports multiple cloud and bare-metal environments Inspired and informed by Google s experiences Open source, written in Go Manage applications, not machines

Separation of Concerns Application (Dev) Cluster Kernel/OS (System) Hardware

Workload Portability Kubernetes Goals API and implementation 100% open Modular and replaceable Don t force apps to know about concepts that are Cloud Provider Specific Kubernetes Specific Enable Users To Write once, run anywhere Avoid vendor lock-in Avoid coupling app to infrastructure

Pods Small group of containers & volumes apiversion: v1 pod.yaml kind: Pod name: mypod The atom of scheduling & placement spec: Shared namespace containers: share IP address & localhost - name: filepuller share IPC, etc. image: saadali/filepuller:v2 - name: webserver Managed lifecycle image: saadali/webserver:v3 Tightly coupled bound to a node, restart in place can die, cannot be reborn with same ID Example: data puller & web server

ReplicaSets apiversion: extensions/v1beta1 kind: ReplicaSet Runs out-of-process wrt API server name: frontend spec: One job: ensure N copies of a pod replicas: 4 template: grouped by a selector spec: containers: too few? start some - name: php-redis too many? kill some image: saadali/gb-frontend:v3 resources: requests: Layered on top of the public Pod cpu: 100m API memory: 100Mi env: - name: GET_HOSTS_FROM Replicated pods are fungible value: dns No implied order or identity ports: - containerport: 80 A simple control loop

Problem Files in containers are ephemeral Container termination/crashes result in loss of data Can t run stateful applications Can t share files between containers Content Manager Consumers File Puller Web Server? Pod

Kubernetes Volumes Directory, possibly with some data in it Accessible by all containers in pod Volume Plugins Define How directory is setup Medium that backs it Contents of the directory Lifetime same as the pod or longer Content Manager Consumers File Puller Volume Pod Web Server

Kubernetes Volume Plugins Kubernetes has many volume plugins Remote Storage GCE Persistent Disk AWS Elastic Block Store Azure File Storage Azure Data Disk Dell EMC ScaleIO iscsi Flocker NFS vsphere GlusterFS Ceph File and RBD Cinder Quobyte Volume FibreChannel VMware Photon PD Ephemeral Storage Empty dir (and tmpfs) Expose Kubernetes API Secret ConfigMap DownwardAPI Local Storage (Alpha) Out-of-Tree Flex (exec a binary) CSI (Future) Other Host path

GCE PD Example Volume referenced directly apiversion: v1 pod.yaml kind: Pod name: sleepypod spec: volumes: - name: data gcepersistentdisk: pdname: panda-disk fstype: ext4 containers: - name: sleepycontainer image: gcr.io/google_containers/busybox command: - sleep - "6000" volumemounts: - name: data mountpath: /data readonly: false

GCE PD Example Volume referenced directly apiversion: v1 pod.yaml kind: Pod name: sleepypod spec: volumes: - name: data gcepersistentdisk: pdname: panda-disk fstype: ext4 containers: - name: sleepycontainer image: gcr.io/google_containers/busybox command: - sleep - "6000" volumemounts: - name: data mountpath: /data readonly: false

GCE PD Example Volume referenced directly apiversion: v1 pod.yaml kind: Pod name: sleepypod spec: volumes: - name: data gcepersistentdisk: pdname: panda-disk fstype: ext4 containers: - name: sleepycontainer image: gcr.io/google_containers/busybox command: - sleep - "6000" volumemounts: - name: data mountpath: /data readonly: false

GCE PD Example Volume referenced directly apiversion: v1 pod.yaml kind: Pod name: sleepypod spec: volumes: - name: data gcepersistentdisk: pdname: panda-disk fstype: ext4 containers: - name: sleepycontainer image: gcr.io/google_containers/busybox command: - sleep - "6000" volumemounts: - name: data mountpath: /data readonly: false

GCE PD Example Volume referenced directly apiversion: v1 pod.yaml kind: Pod name: sleepypod spec: volumes: - name: data gcepersistentdisk: pdname: panda-disk fstype: ext4 containers: - name: sleepycontainer image: gcr.io/google_containers/busybox command: - sleep - "6000" volumemounts: - name: data mountpath: /data readonly: false

PV/PVC Example apiversion: v1 pv1.yaml kind: PersistentVolume name : mypv1 spec: accessmodes: - ReadWriteOnce capacity: storage: 10Gi persistentvolumereclaimpolicy: Retain gcepersistentdisk: fstype: ext4 pdname: panda-disk apiversion: v1 kind: PersistentVolume name : mypv2 spec: accessmodes: - ReadWriteOnce capacity: storage: 100Gi persistentvolumereclaimpolicy: Retain gcepersistentdisk: fstype: ext4 pdname: panda-disk2 pv2.yaml

PV/PVC Example $ kubectl create -f pv.yaml persistentvolume "pv1" created persistentvolume "pv2" created $ kubectl get pv NAME CAPACITY pv1 10Gi pv2 100Gi ACCESSMODES RWO RWO STATUS Available Available CLAIM REASON AGE 1m 1m

PV/PVC Example apiversion: v1 kind: PersistentVolumeClaim name: mypvc namespace: testns spec: accessmodes: - ReadWriteOnce resources: requests: storage: 100Gi pvc.yaml

PV/PVC Example $ kubectl create -f pv.yaml persistentvolume "pv1" created persistentvolume "pv2" created $ kubectl get pv NAME CAPACITY pv1 10Gi pv2 100Gi ACCESSMODES RWO RWO STATUS Available Available CLAIM REASON AGE 1m 1m STATUS Available Bound CLAIM REASON AGE 3m 3m $ kubectl create -f pvc.yaml persistentvolumeclaim "mypvc" created $ kubectl get pv NAME CAPACITY pv1 10Gi pv2 100Gi ACCESSMODES RWO RWO testns/mypvc

PV/PVC Example Volume referenced via PVC apiversion: v1 pod.yaml kind: Pod name: sleepypod spec: volumes: volumes: - name: data - name: data persistentvolumeclaim: gcepersistentdisk: claimname: mypvc pdname: panda-disk fstype: ext4 containers: - name: sleepycontainer image: gcr.io/google_containers/busybox command: - sleep - "6000" volumemounts: - name: data mountpath: /data readonly: false

Dynamic Provisioning and Storage Classes Allows storage to be created on-demand (when requested by user). Eliminates need for cluster administrators to pre-provision storage. Storage Class Cluster Admin PVClaim User Storage Provider

Dynamic Provisioning and Storage Classes Cluster/Storage admins enable dynamic provisioning Cluster by creating StorageClass Admin StorageClass defines the kind: StorageClass parameters used during apiversion: storage.k8s.io/v1 creation. name: slow provisioner: kubernetes.io/gce-pd StorageClass parameters parameters: opaque to Kubernetes so type: pd-standard storage providers can expose -kind: StorageClass apiversion: storage.k8s.io/v1 any number of custom parameters for the cluster name: fast provisioner: kubernetes.io/gce-pd admin to use. parameters: type: pd-ssd Storage Class sc.yaml

Dynamic Provisioning and Storage Classes Users consume storage the same way: PVC Selecting a storage class in PVC triggers dynamic provisioning PVClaim apiversion: v1 kind: PersistentVolumeClaim name: mypvc namespace: testns spec: accessmodes: - ReadWriteOnce resources: requests: storage: 100Gi storageclassname: fast pv2.yaml

Dynamic Provisioning and Storage Classes Users consume storage the same way: PVC Selecting a storage class in PVC triggers dynamic provisioning Storage Provider $ kubectl create -f storage_class.yaml storageclass "fast" created $ kubectl create -f pvc.yaml persistentvolumeclaim "mypvc" created $ kubectl get pvc --all-namespaces NAMESPACE NAME testns mypvc STATUS Bound VOLUME pvc-331d7407-fe18-11e6-b7cd-42010a8000cd $ kubectl get pv pvc-331d7407-fe18-11e6-b7cd-42010a8000cd NAME CAPACITY ACCESSMODES pvc-331d7407-fe18-11e6-b7cd-42010a8000cd 100Gi RWO RECLAIMPOLICY Delete STATUS Bound CAPACITY 100Gi ACCESSMODES RWO CLAIM testns/mypvc REASON AGE 6s AGE 13m

Dynamic Provisioning and Storage Classes Volume referenced via PVC apiversion: v1 pod.yaml kind: Pod name: sleepypod spec: volumes: - name: data persistentvolumeclaim: claimname: mypvc containers: - name: sleepycontainer image: gcr.io/google_containers/busybox command: - sleep - "6000" volumemounts: - name: data mountpath: /data readonly: false

Dynamic Provisioning and Storage Classes Default Storage Classes Allow dynamic provisioning even when a StorageClass is not specified in PVC Pre-installed Default Storage Classes: Amazon AWS - EBS volume Google Cloud (GCE/GKE) GCE PD Openstack - Cinder Volume Introduced as alpha in Kubernetes 1.2 GA as of 1.6 kind: StorageClass pod.yaml apiversion: storage.k8s.io/v1 name: slow annotations: storageclass.beta.kubernetes.io/is-default-class: "true" provisioner: kubernetes.io/gce-pd parameters: type: pd-standard -kind: StorageClass apiversion: storage.k8s.io/v1 name: fast provisioner: kubernetes.io/gce-pd parameters: type: pd-ssd

Helm Package manager for Kubernetes Simplifies deployment and management of Kubernetes applications.

What s Next for Kubernetes Storage? Kubernetes Storage is investing in Container Storage Interface (CSI) Standardized Out-of-Tree File and Block Volume Plugins Local Storage Making node local storage available as persistent volume Capacity Isolation Setting up limits so that a single pod can t consume all available node storage via overlay FS, logs, etc.

Questions? Saad Ali Google @the_saad_ali Chris Duchesne {code} by Dell EMC @ChrisDuchesne Get Involved! Kubernetes Storage Special-Interest-Group (SIG) https://github.com/kubernetes/community/tree/master/sig-storage Meeting every 2 weeks, Thursdays at 9 AM (PST) Container Storage Interface Community https://github.com/container-storage-interface/community Meeting every 2 weeks, Wednesdays at 8 AM (PT) CNCF Storage Workgroup https://github.com/cncf/wg-storage Meeting 3rd Wednesday of every month at 8 AM (PT) http://kubernetes.io Other Kubernetes SIGs https://github.com/kubernetes/community/blob/mas ter/sig-list.md Meetups https://www.meetup.com/topics/kubernetes