The CSI, Container Storage Interface, is an RPC-based plugin API specification for container storage management.
The container orchestrator (Kubernetes, Mesos, Nomad, etc.) calls RPCs via gRPC, implemented by CSI plugin servers.
The plugin servers (also called drivers), implement three services: Identity, Controller, and Node.
The Identity service informs the container orchestrator about the plugin, its capabilities, and its status.
The Controller service performs operations that are global to the container orchestrator or external to the container orchestrator.
The Node service performs operations that are local to a machine and a container which are being managed by the container orchestrator.
It is common for all of the services to be compiled into the same container image. Depending on the container orchestrator, this container is deployed in a centralized or distributed fashion.
All APIs are designed to be idempotent.
- API calls can be reliable in the face of dropped network requests.
- Duplicate calls to create storage don't result in orphaned disks.
- Duplicate calls to delete storage don't result in lost data.
The API was designed to be simple and compatible with many storage systems.
- Network-attached storage and Local Storage
- TCP or UDP based network attached storage protocols
- HTTP based network attached storage protocols
- Local devices
- Block Storage and Object Storage (via FUSE)
- Preformatted filesystems and raw device storage
- Pre-provisioned storage and dynamically provisioned storage
- Single writer and multiple writers
Identiy RPCs specified by the CSI
- GetPluginCapabilities
- GetPluginInfo
- Probe
Controller RPCs specified by the CSI
- ControllerGetCapabilities
- CreateVolume
- DeleteVolume
- ControllerPublishVolume
- ControllerUnpublishVolume
- ValidateVolumeCapabilities
- ListVolumes
- GetCapacity
- CreateSnapshot
- DeleteSnapshot
- ListSnapshots
- ControllerExpandVolume
Node RPCs specified by CSI
- NodeGetCapabilities
- NodeStageVolume
- NodeUnstageVolume
- NodePublishVolume
- NodeUnpublishVolume
- NodeGetVolumeStats
- NodeExpandVolume
- NodeGetInfo
The Volume Lifecycle
https://blog.architecting.it/wp-content/uploads/2018/02/Post3CAD-Image1.png
Example CSI drivers:
- Linode Block Storage
- GCE Persistent Disk
- AWS Elastic Block Storage
- Azure disk
- vSphere
- Digital Ocean Block Storage
- Portworx
- GlusterFS
- CephFS
- NFS
The current version of the spec is 1.1.0, released on March 8th.
- Volume Expansion
- Volume Cloning
- Topology
Further information
CSI Specification on GitHub
https://github.com/container-storage-interface/spec
Kubernetes Slack channels
#wg-csi
#sig-storage
Thank you for attending!
Andrew Sauber
Senior Developer at Linode
Twitter: @wk3as
GitHub: asauber
#linode on Kubernetes Slack