K8s Storage - kimschles/schlesinger-knowledge GitHub Wiki
The many types of storage in kubernetes - and why we have them
John Griffith of Red Hat at the June 2019 Kubernetes Colorado Meetup
Introduction to K8s Storage Concepts
Volumes
- early, simple implementation
- storage was external
- pre-provisioned attachable storage
- iSCSI
- EBS
- NFS
- ceph
- pre-provisioned attachable storage
- the user request for volumes was included in the connection info
- kubelet attaches volume to node pod is running on and bind-mounts it
PVs and PVCs
- volumes worked, but they were ugly because users had to know details about storage and how to consume it
- the abstraction begins!
- the admin creates a PV and configures them in k8s
- pvs are storage pools that users can request volumes from
- K8s PV controller tries to allocate from available pools
Kubernetes Dynamic Provisioning
- the admin no longer has to provision
- introduce StorageClass to indicate 'what' storage pool to allocate PVs from
- marked stable in kubernetes version 1.6
Provisioners
- buckle up.
- different use cases warrant different types of storage
- storage vendors start to realize K8s is hot
- everone wants a provisioner for their storage
- lots of bloat
External Provisioners
- make provisioners an add-on
- everyone has to specialize in vendor-specific provisioners
Flex Volumes
- provided a framework to easily create an external provisioner
- could be as simple as a bash script that was loaded on the cluster
CSI
- container storage interface
- goal of the group: design an interace to specify all the operation we will need
- provide a contract to bind the container orchestrator (whatever comes after kubernetes)
- prescribe how to create a plugin for your storage
- keep the provisioners out of the kubernetes source
- provide a spec for storage plugins to work on various container platforms
- defined and built by the community
- see https://kubernetes-csi.github.io/