Integrating Kubernetes Persistent Volumes into a ... · Kubernetes and Scale-out Apps Container...

42
2019 Storage Developer Conference. © Insert Your Company Name. All Rights Reserved. 1 Integrating Kubernetes Persistent Volumes into a Composable Infrastructure Platform Brian Pawlowski DriveScale Inc.

Transcript of Integrating Kubernetes Persistent Volumes into a ... · Kubernetes and Scale-out Apps Container...

Page 1: Integrating Kubernetes Persistent Volumes into a ... · Kubernetes and Scale-out Apps Container Storage Interface (CSI) ... Aggregate/virtualize media behind small number of network

2019 Storage Developer Conference. © Insert Your Company Name. All Rights Reserved. 1

Integrating Kubernetes Persistent Volumes into a Composable Infrastructure Platform

Brian PawlowskiDriveScale Inc.

Page 2: Integrating Kubernetes Persistent Volumes into a ... · Kubernetes and Scale-out Apps Container Storage Interface (CSI) ... Aggregate/virtualize media behind small number of network

2019 Storage Developer Conference. © Insert Your Company Name. All Rights Reserved. 2

Agenda Composable Infrastructure

The problem with Scale-out Apps DriveScale Solution

Kubernetes and Scale-out Apps Container Storage Interface (CSI)

Persistent vs. non-persistent volumes DriveScale plug-in for Kubernetes

Feature summary In operation Failover/migration (wording…)

Future

Page 3: Integrating Kubernetes Persistent Volumes into a ... · Kubernetes and Scale-out Apps Container Storage Interface (CSI) ... Aggregate/virtualize media behind small number of network

2019 Storage Developer Conference. © Insert Your Company Name. All Rights Reserved. 3

The Problem with Scale-out Applications

Widely deployed scale-out apps (Cassandra, Hadoop, Spark, etc) are defined primarily as local DAS reference architectures Scale compute/storage together Use commodity platforms

Issues arise in practice Getting the compute/storage ratio right is hard – leads to overprovisioning Coupled lifetimes lead to unwanted tech refresh

What about legacy enterprise storage? Aggregate/virtualize media behind small number of network interfaces,

introducing performance issues

Page 4: Integrating Kubernetes Persistent Volumes into a ... · Kubernetes and Scale-out Apps Container Storage Interface (CSI) ... Aggregate/virtualize media behind small number of network

2019 Storage Developer Conference. © Insert Your Company Name. All Rights Reserved. 4

Scale-Out Applications

Page 5: Integrating Kubernetes Persistent Volumes into a ... · Kubernetes and Scale-out Apps Container Storage Interface (CSI) ... Aggregate/virtualize media behind small number of network

2019 Storage Developer Conference. © Insert Your Company Name. All Rights Reserved. 5

Scale-out Applications Recovery

Applications like Cassandra can withstand the loss of a node with local storage Triggers a rebuild of the data from the replicas

Composable Infrastructure (DriveScale) lets you separate the storage from the compute and reattach the data to a new node Avoiding rebuild time and overhead

Disaggegated storage for persistent volumes brings this capability to Kubernetes

Page 6: Integrating Kubernetes Persistent Volumes into a ... · Kubernetes and Scale-out Apps Container Storage Interface (CSI) ... Aggregate/virtualize media behind small number of network

2019 Storage Developer Conference. © Insert Your Company Name. All Rights Reserved. 6

Terminology

Page 7: Integrating Kubernetes Persistent Volumes into a ... · Kubernetes and Scale-out Apps Container Storage Interface (CSI) ... Aggregate/virtualize media behind small number of network

2019 Storage Developer Conference. © Insert Your Company Name. All Rights Reserved. 7

TerminologyTerm Definition

CSI The Container Storage Interface provides a standard interface for any Container Orchestration systems (like Kubernetes) to expose arbitrary storage systems to their container workloads.

Volume A unit of storage made available inside of a CO-managed container, via the CSI. Ephemeral or Persistent.

Persistent Volume A volume that persists beyond the lifetime of a pod.

Block Volume A volume that will appear as a block device inside the container. (not supported currently by DriveScale(

Mounted Volume A volume that will be mounted using the specified file system and appears as a directory inside the container.

FlexVolume Obsolete Kubernetes-specific volume API preceding CSI.

CO Container Orchestration system, communicates with Plugins using CSI service RPCs.

SP Storage Provider, the vendor of a CSI plugin implementation.

Drive Any of HDD, SSD, or SSD slice

HDD Hard Disk Drive (spinning disk)

SSD Solid State Drive or Device

SSD slice A right-sized virtual slice of an SSD

RAID Redundant Array of Independent Drives (RAID 0 – striped, RAID 1 – mirror, RAID 5 and 6 – parity)

Pod Group containers, share an IP address, have a Kubelet agent

Kubelet An agent that runs on each node in the cluster. It makes sure that containers are running in a pod

gRPC Google Remote Procedure Call.

Node A host where the user workload will be running, uniquely identifiable from the perspective of a Plugin by a node ID.

Plugin Aka “plugin implementation”, a gRPC endpoint that implements the CSI Services.

Plugin Supervisor Process that governs the lifecycle of a Plugin, MAY be the CO.

Workload The atomic unit of "work" scheduled by a CO. A container or a collection of containers.

Page 8: Integrating Kubernetes Persistent Volumes into a ... · Kubernetes and Scale-out Apps Container Storage Interface (CSI) ... Aggregate/virtualize media behind small number of network

2019 Storage Developer Conference. © Insert Your Company Name. All Rights Reserved. 8

Enter Kubernetes

Page 9: Integrating Kubernetes Persistent Volumes into a ... · Kubernetes and Scale-out Apps Container Storage Interface (CSI) ... Aggregate/virtualize media behind small number of network

2019 Storage Developer Conference. © Insert Your Company Name. All Rights Reserved. 9

Kubernetes

<fill in intro>

Page 10: Integrating Kubernetes Persistent Volumes into a ... · Kubernetes and Scale-out Apps Container Storage Interface (CSI) ... Aggregate/virtualize media behind small number of network

2019 Storage Developer Conference. © Insert Your Company Name. All Rights Reserved. 10

History of KubernetesOld Days Google Borg, etc.

2008 • cgroups introduced to mainstream Linux

2014 • Extreme-early adopters of Google Kubernetes

2015 • CNCF launches, Google’s managed Kubernetes GKE opn K8s to a wider community• Red Hat’s OpenShift launches

2016 • Focus moves to other clouds or on prem to adopt Kubernetes

2017 • Managed Kubernetes begins to appear on AWS and Azure• Docker and Mesosphere announce support for Kubernetes• Kubernetes becomes the de facto standard• Production deployments at scale begin

2018 • Additional managed services (DigitalOcean, Oracle)• Investment shifts to the lifecycle management in Kubernetes

Page 11: Integrating Kubernetes Persistent Volumes into a ... · Kubernetes and Scale-out Apps Container Storage Interface (CSI) ... Aggregate/virtualize media behind small number of network

2019 Storage Developer Conference. © Insert Your Company Name. All Rights Reserved. 11

Kubernetes Architecture

https://en.wikipedia.org/wiki/File:Kubernetes.png

Page 12: Integrating Kubernetes Persistent Volumes into a ... · Kubernetes and Scale-out Apps Container Storage Interface (CSI) ... Aggregate/virtualize media behind small number of network

2019 Storage Developer Conference. © Insert Your Company Name. All Rights Reserved. 12

Kubernetes Architecture (DELETE)

t …

Firewall

kubelet

Pod Pod Pod

Proxy

docker

Node

cAdvisor container container

Page 13: Integrating Kubernetes Persistent Volumes into a ... · Kubernetes and Scale-out Apps Container Storage Interface (CSI) ... Aggregate/virtualize media behind small number of network

2019 Storage Developer Conference. © Insert Your Company Name. All Rights Reserved. 13

CSI

Page 14: Integrating Kubernetes Persistent Volumes into a ... · Kubernetes and Scale-out Apps Container Storage Interface (CSI) ... Aggregate/virtualize media behind small number of network

2019 Storage Developer Conference. © Insert Your Company Name. All Rights Reserved. 14

Container Storage Interface (CSI)

Consistent, orchestration independent volume mgmt API

Dynamic provisioning and deprovisioning of a volume.

Attaching or detaching a volume from a node. Mounting/unmounting a volume from a node.

Page 15: Integrating Kubernetes Persistent Volumes into a ... · Kubernetes and Scale-out Apps Container Storage Interface (CSI) ... Aggregate/virtualize media behind small number of network

2019 Storage Developer Conference. © Insert Your Company Name. All Rights Reserved. 15

DriveScale in Three Slides

Page 16: Integrating Kubernetes Persistent Volumes into a ... · Kubernetes and Scale-out Apps Container Storage Interface (CSI) ... Aggregate/virtualize media behind small number of network

2019 Storage Developer Conference. © Insert Your Company Name. All Rights Reserved. 16

Evolution of Workloads

Traditional WorkloadsMany apps managed on each server with shared

enterprise storage

vSphere

Shared NAS or SAN Storage

ESX

VM

App

VM

App

VM

App

VM

App

ESX

VM

App

VM

App

VM

App

VM

App

Data Intensive Workloads

Apps running on clusters of servers with local storage

Hadoop Cassandra Spark Kubernetes

VMs NAS SAN

Page 17: Integrating Kubernetes Persistent Volumes into a ... · Kubernetes and Scale-out Apps Container Storage Interface (CSI) ... Aggregate/virtualize media behind small number of network

2019 Storage Developer Conference. © Insert Your Company Name. All Rights Reserved. 17

Rethink data center architecture

Data Intensive Workloads

Apps running on clusters of servers with local storage

Hadoop Cassandra Spark Kubernetes

Server with local storage

• Tightly coupled, fixed resources• Commonly overprovisioned• Stranded compute and storage resources• Server SKU sprawl• Lifecycles tied together

Page 18: Integrating Kubernetes Persistent Volumes into a ... · Kubernetes and Scale-out Apps Container Storage Interface (CSI) ... Aggregate/virtualize media behind small number of network

2019 Storage Developer Conference. © Insert Your Company Name. All Rights Reserved. 18

The DriveScale Composable Platform

Automated creation of logical servers

Automated end-to-end set up for NVMe/TCP, NVMe/RDMA or iSCSI

Patented load balancing

Each resource treated as independent from its enclosure

ToR Ethernet switches10G, 25G, 100G, 400G

Diskless servers (boot drive)DriveScale Server Agent

eBODs, JBODs (Flash, HDD)DriveScale Adapter Software

DriveScale Composer• Policy• Orchestration• Monitoring

Page 19: Integrating Kubernetes Persistent Volumes into a ... · Kubernetes and Scale-out Apps Container Storage Interface (CSI) ... Aggregate/virtualize media behind small number of network

2019 Storage Developer Conference. © Insert Your Company Name. All Rights Reserved. 19

DriveScale CSI Plug-in

Page 20: Integrating Kubernetes Persistent Volumes into a ... · Kubernetes and Scale-out Apps Container Storage Interface (CSI) ... Aggregate/virtualize media behind small number of network

2019 Storage Developer Conference. © Insert Your Company Name. All Rights Reserved. 20

Overview of DriveScale CSI Scalable Persistent Storage for Containers

Location Aware (performance and failure domain optimization) Shared Nothing (maintains local drive benefits) Enterprise scale (10,000’s compute, 100,000s drives)

Direct Attached performance Deliver native performance of the devices to containers Equivalent to applications running in Bare Metal servers

Data locality for Containers Delivers Data Locality/IO scalability/performance for containerized applications

Logical connection between drives and containers that can move with containers Storage and Data Persistence Transparent to applications running in containers Container mobility critical to deliver efficiency gains (avoid copies and rebuilds)

Page 21: Integrating Kubernetes Persistent Volumes into a ... · Kubernetes and Scale-out Apps Container Storage Interface (CSI) ... Aggregate/virtualize media behind small number of network

2019 Storage Developer Conference. © Insert Your Company Name. All Rights Reserved. 21

Kubernetes on DriveScaleDriveScale Domain

K1 K2 K3

Inventory

Kubernetes

Page 22: Integrating Kubernetes Persistent Volumes into a ... · Kubernetes and Scale-out Apps Container Storage Interface (CSI) ... Aggregate/virtualize media behind small number of network

2019 Storage Developer Conference. © Insert Your Company Name. All Rights Reserved. 22

Kubernetes on Drivescale

A Kubernetes cluster maps to a single DriveScale cluster Kubernetes is the software/container orchestrator DriveScale is the hardware/physical orchestrator

Multiple Kubernetes clusters can run in a DriveScaledomain (data center) DriveScale clusters are created dynamically when

Kubernetes requests PVs

Page 23: Integrating Kubernetes Persistent Volumes into a ... · Kubernetes and Scale-out Apps Container Storage Interface (CSI) ... Aggregate/virtualize media behind small number of network

2019 Storage Developer Conference. © Insert Your Company Name. All Rights Reserved. 23

Dynamic PV Lifecycle with DriveScaleCreateVolume

ControllerPublishVolume

NodeStage Volume

NodePublish Volume

DeleteVolume

ControllerUnpublishVolume

NodeUnstage Volume

NodeUnpublish Volume

Page 24: Integrating Kubernetes Persistent Volumes into a ... · Kubernetes and Scale-out Apps Container Storage Interface (CSI) ... Aggregate/virtualize media behind small number of network

2019 Storage Developer Conference. © Insert Your Company Name. All Rights Reserved. 24

Creating a DriveScale Volume

CreateVolume

ControllerPublishVolume

NodeStage Volume

NodePublish Volume

• Add Logical Node• Add Drives• Map Drives to Logical Node

DriveScale APIKubernetes CSI

• Add Server• Map Server to Logical Node

• 1 Logical Node <→ 1 PV

Result

• Add Server• Map Server to Logical Node

Page 25: Integrating Kubernetes Persistent Volumes into a ... · Kubernetes and Scale-out Apps Container Storage Interface (CSI) ... Aggregate/virtualize media behind small number of network

2019 Storage Developer Conference. © Insert Your Company Name. All Rights Reserved. 25

Creating a DriveScale Volume

create volume (only needed when the PV does not exist) - create a logical node and assign drives to it based on request (can include topology info). (First PV also creates a DriveScale cluster)

controller publish volume (runs from outside the destination node - so that it’s possible to actually remove a drive from a node if the node is down) - will attach the target node to the volume logical node. The drives are visible as block devices, they are formatted, encrypted block device is created if using encryption but not mounted.

node stage volume (runs on the node - called once per node using the volume) - will mount the volume in a common location (does nothing if using a block volume rather than mount volume). The mount operation is done by the CSI driver, not through the API (because the mount is supposed to happen inside the container the CSI driver runs in which the agent has no visibility on)

node publish volume (runs on the node - called once per pod using the volume - note there can be multiple containers in a pod) - will bind mount from the common location to the pod specific mount point. For block volumes, it will create a block device file corresponding to the drive in the right location. Here as well the mount operation / mknod is done by the CSI driver for the same reason as in the previous step

Page 26: Integrating Kubernetes Persistent Volumes into a ... · Kubernetes and Scale-out Apps Container Storage Interface (CSI) ... Aggregate/virtualize media behind small number of network

2019 Storage Developer Conference. © Insert Your Company Name. All Rights Reserved. 26

Types of DriveScale PVs

HDD SSD RAID 0 HDD or SSD SSD slices

Page 27: Integrating Kubernetes Persistent Volumes into a ... · Kubernetes and Scale-out Apps Container Storage Interface (CSI) ... Aggregate/virtualize media behind small number of network

2019 Storage Developer Conference. © Insert Your Company Name. All Rights Reserved. 27

Scale-out Arguments for DriveScale PVs

<Discuss target applications and their storage>

Page 28: Integrating Kubernetes Persistent Volumes into a ... · Kubernetes and Scale-out Apps Container Storage Interface (CSI) ... Aggregate/virtualize media behind small number of network

2019 Storage Developer Conference. © Insert Your Company Name. All Rights Reserved. 28

Subhead Example 1 Example 2

Subhead

Page 29: Integrating Kubernetes Persistent Volumes into a ... · Kubernetes and Scale-out Apps Container Storage Interface (CSI) ... Aggregate/virtualize media behind small number of network

2019 Storage Developer Conference. © Insert Your Company Name. All Rights Reserved. 29

Subhead Example 1 Example 2

Subhead

Page 30: Integrating Kubernetes Persistent Volumes into a ... · Kubernetes and Scale-out Apps Container Storage Interface (CSI) ... Aggregate/virtualize media behind small number of network

2019 Storage Developer Conference. © Insert Your Company Name. All Rights Reserved. 30

Architecture

<add picture extending Kubernetes architecture to show PVs and DriveScale composer>

Page 31: Integrating Kubernetes Persistent Volumes into a ... · Kubernetes and Scale-out Apps Container Storage Interface (CSI) ... Aggregate/virtualize media behind small number of network

2019 Storage Developer Conference. © Insert Your Company Name. All Rights Reserved. 31

Creating a DriveScale Volume (APIs)

<show the APIs invoked in creation process>

Page 32: Integrating Kubernetes Persistent Volumes into a ... · Kubernetes and Scale-out Apps Container Storage Interface (CSI) ... Aggregate/virtualize media behind small number of network

2019 Storage Developer Conference. © Insert Your Company Name. All Rights Reserved. 32

Avoiding copies or rebuilds

<Motivation for DS PV support>

Page 33: Integrating Kubernetes Persistent Volumes into a ... · Kubernetes and Scale-out Apps Container Storage Interface (CSI) ... Aggregate/virtualize media behind small number of network

2019 Storage Developer Conference. © Insert Your Company Name. All Rights Reserved. 33

Migrating a DriveScale Volume

<Show the steps taken to move a DS volume>

Page 34: Integrating Kubernetes Persistent Volumes into a ... · Kubernetes and Scale-out Apps Container Storage Interface (CSI) ... Aggregate/virtualize media behind small number of network

2019 Storage Developer Conference. © Insert Your Company Name. All Rights Reserved. 34

Failover a DriveScale Volume

<Show the steps taken to failover a DS volume>

Page 35: Integrating Kubernetes Persistent Volumes into a ... · Kubernetes and Scale-out Apps Container Storage Interface (CSI) ... Aggregate/virtualize media behind small number of network

2019 Storage Developer Conference. © Insert Your Company Name. All Rights Reserved. 35

Failover a DriveScale Volume

<graphic comparison of performance hit>

Page 36: Integrating Kubernetes Persistent Volumes into a ... · Kubernetes and Scale-out Apps Container Storage Interface (CSI) ... Aggregate/virtualize media behind small number of network

2019 Storage Developer Conference. © Insert Your Company Name. All Rights Reserved. 36

Future Work

Page 37: Integrating Kubernetes Persistent Volumes into a ... · Kubernetes and Scale-out Apps Container Storage Interface (CSI) ... Aggregate/virtualize media behind small number of network

2019 Storage Developer Conference. © Insert Your Company Name. All Rights Reserved. 37

Future Work

<What will we be doing in future for plug-in>

Page 38: Integrating Kubernetes Persistent Volumes into a ... · Kubernetes and Scale-out Apps Container Storage Interface (CSI) ... Aggregate/virtualize media behind small number of network

2019 Storage Developer Conference. © Insert Your Company Name. All Rights Reserved. 38

Backup

Page 39: Integrating Kubernetes Persistent Volumes into a ... · Kubernetes and Scale-out Apps Container Storage Interface (CSI) ... Aggregate/virtualize media behind small number of network

2019 Storage Developer Conference. © Insert Your Company Name. All Rights Reserved. 39

References https://github.com/container-storage-interface/spec/blob/master/spec.md https://kubernetes.io/docs/concepts/storage/volumes/#csi https://kubernetes-csi.github.io/docs/ https://github.com/DriveScale/k8s-plugins Volumes: https://kubernetes.io/docs/concepts/storage/volumes/ https://kubernetes.io/docs/concepts/storage/persistent-volumes/ https://kubernetes.io/docs/concepts/workloads/pods/pod/ https://grpc.io/blog/principles/ Children’s Guide to Kubernetes : https://www.youtube.com/watch?v=4ht22ReBjno https://static.googleusercontent.com/media/research.google.com/en//pubs/archive/41684.pdf Kubernetes: https://en.wikipedia.org/wiki/Kubernetes Persistent volumes by example: http://kubernetesbyexample.com/pv/

Page 40: Integrating Kubernetes Persistent Volumes into a ... · Kubernetes and Scale-out Apps Container Storage Interface (CSI) ... Aggregate/virtualize media behind small number of network

2019 Storage Developer Conference. © Insert Your Company Name. All Rights Reserved. 40

DriveScale makes it easy to adopt new technologies

Scale-out micro services, cloud-native applications

NVMe over fabrics (TCP, RDMA, iSCSI)

Accelerators:GPUs and FPGAs

Faster processors Latest drive technology

Page 41: Integrating Kubernetes Persistent Volumes into a ... · Kubernetes and Scale-out Apps Container Storage Interface (CSI) ... Aggregate/virtualize media behind small number of network

2019 Storage Developer Conference. © Insert Your Company Name. All Rights Reserved. 41

Gain the transformative economics of composable

44% savingsfor upgrades

50% lower cost than legacy and cloud

69% less datacenter footprint

2 minutes to deploy infrastructure No more overprovisioning

Page 42: Integrating Kubernetes Persistent Volumes into a ... · Kubernetes and Scale-out Apps Container Storage Interface (CSI) ... Aggregate/virtualize media behind small number of network

2019 Storage Developer Conference. © Insert Your Company Name. All Rights Reserved. 422019 Storage Developer Conference. © Insert Your Company Name. All Rights Reserved.

Bullet one Bullet two

Bullet 3 Bullet 4