Slide 1

Slide 1 text

What is the Container Storage Interface (CSI)? May 1, 2018 Saad Ali Senior Software Engineer, Google Co-Author of CSI github.com/saad-ali twitter.com/the_saad_ali

Slide 2

Slide 2 text

Agenda Background Introduction to CSI CSI with Kubernetes Current Status Q/A

Slide 3

Slide 3 text

Background What’s the problem CSI solves? 1

Slide 4

Slide 4 text

What’s the problem? Kubernetes “In-tree” Volume Plugins are awesome =) Powerful abstraction for file and block storage. Automate provisioning, attaching, mounting, and more! Storage portability via PV/PVC/StorageClass objects

Slide 5

Slide 5 text

What’s the problem? Kubernetes “In-tree” Volume Plugins are painful =( Painful for Kubernetes Developers • Testing and maintaining external code • Bugs in volume plugins affect critical Kubernetes components • Volume plugins get full privileges of kubernetes components Painful for Storage Vendors • Dependent on Kubernetes releases • Source code forced to be open source

Slide 6

Slide 6 text

We’re not alone! Container orchestration (CO) systems want to enable as many storage systems as possible, with as little work as possible. Storage providers (SP) want to expose their product to as many users as possible, with as little work as possible.

Slide 7

Slide 7 text

Solution: CSI! CSI makes Kubernetes volume layer truly extensible.

Slide 8

Slide 8 text

Introduction to CSI What is CSI? 2

Slide 9

Slide 9 text

What is CSI? CSI does not define Plugin packaging, deployment, monitoring, etc. • Let COs and/or plugin authors decide. "Grades of storage" or a “storage catalogue”. • Can be built using the methods exposed.

Slide 10

Slide 10 text

What is CSI? CSI is Open Source • Contributions welcome! Evolving • Example: Create/delete snapshots and topology functionality recently added. Minimal Interface that enables 3 main use cases: • Create/delete volume • Attach/detach volume to a node • Mount/unmount volume to a node

Slide 11

Slide 11 text

CSI Overview gRPC interfaces segmented into 3 gRPC “services”: Controller • Maybe run anywhere in the cluster. Node • Must run only on the node where workload referencing volume is scheduled. Identity • Plugin information

Slide 12

Slide 12 text

CSI Overview Let’s talk about naming: Create/delete volume Attach/detach volume Mount/unmount volume

Slide 13

Slide 13 text

CSI Overview Let’s talk about naming: Create/delete volume Attach/detach volume Mount/unmount volume ControllerPublishVolume/ControllerUnpublishVolume NodePublishVolume/NodeUnpublishVolume

Slide 14

Slide 14 text

CSI Overview Controller service ● ControllerGetCapabilities ● CreateVolume ● DeleteVolume ● ControllerPublishVolume ● ControllerUnpublishVolume ● ListVolumes ● GetCapacity ● ValidateVolumeCapabilities ● CreateSnapshot ● DeleteSnapshot ● ListSnapshots Node service ● NodeGetCapabilities ● NodePublishVolume ● NodeUnpublishVolume ● NodeStageVolume ● NodeUnstageVolume ● NodeGetId NodeGetInfo Identity service ● GetPluginCapabilities ● GetPluginInfo ● Probe

Slide 15

Slide 15 text

Controller service ● ControllerGetCapabilities ● CreateVolume ● DeleteVolume ● ControllerPublishVolume ● ControllerUnpublishVolume ● ListVolumes ● GetCapacity ● ValidateVolumeCapabilities ● CreateSnapshot ● DeleteSnapshot ● ListSnapshots CSI Overview Node service ● NodeGetCapabilities ● NodePublishVolume ● NodeUnpublishVolume ● NodeStageVolume ● NodeUnstageVolume ● NodeGetId NodeGetInfo Identity service ● GetPluginCapabilities ● GetPluginInfo ● Probe

Slide 16

Slide 16 text

Controller service ● ControllerGetCapabilities ● CreateVolume ● DeleteVolume ● ControllerPublishVolume ● ControllerUnpublishVolume ● ListVolumes ● GetCapacity ● ValidateVolumeCapabilities ● CreateSnapshot ● DeleteSnapshot ● ListSnapshots CSI Overview Node service ● NodeGetCapabilities ● NodePublishVolume ● NodeUnpublishVolume ● NodeStageVolume ● NodeUnstageVolume ● NodeGetId NodeGetInfo Identity service ● GetPluginCapabilities ● GetPluginInfo ● Probe

Slide 17

Slide 17 text

Controller service ● ControllerGetCapabilities ● CreateVolume ● DeleteVolume ● ControllerPublishVolume ● ControllerUnpublishVolume ● ListVolumes ● GetCapacity ● ValidateVolumeCapabilities ● CreateSnapshot ● DeleteSnapshot ● ListSnapshots CSI Overview Node service ● NodeGetCapabilities ● NodePublishVolume ● NodeUnpublishVolume ● NodeStageVolume ● NodeUnstageVolume ● NodeGetId NodeGetInfo Identity service ● GetPluginCapabilities ● GetPluginInfo ● Probe

Slide 18

Slide 18 text

Controller service ● ControllerGetCapabilities ● CreateVolume ● DeleteVolume ● ControllerPublishVolume ● ControllerUnpublishVolume ● ListVolumes ● GetCapacity ● ValidateVolumeCapabilities ● CreateSnapshot ● DeleteSnapshot ● ListSnapshots CSI Overview Node service ● NodeGetCapabilities ● NodePublishVolume ● NodeUnpublishVolume ● NodeStageVolume ● NodeUnstageVolume ● NodeGetId NodeGetInfo Identity service ● GetPluginCapabilities ● GetPluginInfo ● Probe

Slide 19

Slide 19 text

Controller service ● ControllerGetCapabilities ● CreateVolume ● DeleteVolume ● ControllerPublishVolume ● ControllerUnpublishVolume ● ListVolumes ● GetCapacity ● ValidateVolumeCapabilities ● CreateSnapshot ● DeleteSnapshot ● ListSnapshots CSI Overview Node service ● NodeGetCapabilities ● NodePublishVolume ● NodeUnpublishVolume ● NodeStageVolume ● NodeUnstageVolume ● NodeGetId NodeGetInfo Identity service ● GetPluginCapabilities ● GetPluginInfo ● Probe CREATE_DELETE_VOLUME PUBLISH_UNPUBLISH_VOLUME LIST_VOLUMES GET_CAPACITY CREATE_DELETE_SNAPSHOT LIST_SNAPSHOTS STAGE_UNSTAGE_VOLUME GET_VOLUME_STATS CONTROLLER_SERVICE ACCESSIBILITY_CONSTRAINTS

Slide 20

Slide 20 text

Controller service ● ControllerGetCapabilities ● CreateVolume ● DeleteVolume ● ControllerPublishVolume ● ControllerUnpublishVolume ● ListVolumes ● GetCapacity ● ValidateVolumeCapabilities ● CreateSnapshot ● DeleteSnapshot ● ListSnapshots CSI Overview Node service ● NodeGetCapabilities ● NodePublishVolume ● NodeUnpublishVolume ● NodeStageVolume ● NodeUnstageVolume ● NodeGetId NodeGetInfo Identity service ● GetPluginCapabilities ● GetPluginInfo ● Probe message NodeGetInfoResponse { string node_id = 1; int64 max_volumes_per_node = 2; Topology accessible_topology = 3; }

Slide 21

Slide 21 text

CSI with Kubernetes How does CSI work with Kubernetes? 3

Slide 22

Slide 22 text

How to use a CSI Volume? kind: StorageClass apiVersion: storage.k8s.io/v1 metadata: name: fast-storage provisioner: com.example.csi-driver parameters: type: pd-ssd csiProvisionerSecretName: mysecret csiProvisionerSecretNamespace: mynamespace ------ kind: PersistentVolumeClaim apiVersion: v1 metadata: name: my-request-for-storage spec: accessModes: - ReadWriteOnce resources: requests: storage: 5Gi storageClassName: fast-storage kind: Pod apiVersion: v1 metadata: name: my-pod spec: containers: - name: my-frontend image: nginx volumeMounts: - mountPath: "/var/www/html" name: my-csi-volume volumes: - name: my-csi-volume persistentVolumeClaim: claimName: my-request-for-storage

Slide 23

Slide 23 text

Node DaemonSet Pod CSI Plugin Container: Identity + Node driver-registrar Mount propagation Host /var/lib/kubelet Kubelet /.../sockets/ UDS Master API Server Kube Controller Manager etcd StatefulSet (replica:1) (ensures no more than 1 instance running at a time) CSI Plugin Container: Identity + Controller external-attacher external-provisioner [maybe 1 or 2 containers] EmptyDir Volume gRPC (UDS) UDS UDS Third Party Storage Vendor Container Sidecar containers by Kubernetes Team UDS - Unix Domain Socket

Slide 24

Slide 24 text

Current Status What is the current status of CSI? 4

Slide 25

Slide 25 text

Status of CSI Specification May 2017 • Spec published in GitHub repo December 2017 • v0.1 release (Initial release) February 2018 • v0.2 release (Lots of breaking changes) June 2018 • v0.3 release (Snapshots, Topology) EOY? • v1.0 release https://github.com/ container-storage-interface

Slide 26

Slide 26 text

Kubernetes v1.9 (Q4 ‘17) • Alpha support Kubernetes v1.10 (Q1 ‘18) • Beta support Kubernetes v1.11 (Q2 ‘18) • Block volume support • Kubelet plugin registration Kubernetes v1.11 (Q2 ‘18) • Remote Ephemeral Volumes Kubernetes v1.13 (Q4 ‘18)? • GA support? Status of CO Implementations of CSI https://github.com/ kubernetes-csi

Slide 27

Slide 27 text

Status of CSI Drivers

Slide 28

Slide 28 text

Contact me: ● Saad Ali, Google ● github.com/saad-ali ● twitter.com/the_saad_ali Get Involved! ● Container Storage Interface Community ○ github.com/container-storage-interface/community ○ Meeting every week, Wednesdays at 9 AM (PT) ○ [email protected] ● Kubernetes Storage Special-Interest-Group (SIG) ○ github.com/kubernetes/community/tree/master/sig-storage ○ Meeting every 2 weeks, Thursdays at 9 AM (PST) ○ [email protected] Questions?