DirectCSI is a CSI driver that provisions volumes for workloads that require direct access to the storage medium. A storage medium is accessed directly when there are no layers of indirection between the application accessing storage and the storage medium. Direct access is crucial for applications that are:
- I/O intensive or
- IOPS intensive or
- Manage reliability of data at the application layer or
- Require high consistency guarantees or
- Any combination of the above
High performance applications that are tolerant to drive failures, and/or have the capability to heal data are ideal applications for DirectCSI. Examples of such applications are:
- MinIO
- Cassandra DB
Here is the extremely quickstart:
kubectl krew install direct-csi
kubectl direct-csi install
kubectl direct-csi drives ls
# choose all the drives that direct-csi should manage and format them
kubectl direct-csi drives format --drives $DRIVE_SELECTOR_ELLIPSES --nodes $NODE_SELECTOR_ELLIPSES
# 'direct-csi-min-io' can now be specified as the storageclass in PodSpec.VolumeClaimTemplates
For more information, please visit our documentation.
LocalVolume provisioner also allows direct access to the storage medium. However, it requires manual management of drives and volumes - i.e. it does not support dynamic provisioning of volumes, storage management or dynamic scheduling of pods on nodes with available volumes.
DirectCSI on the other hand, supports dynamic provisioning of volumes, performs allocation of volumes based on storage capacity, and schedules pods to run on nodes which have most capacity available.
HostPath volume also allows direct access to the storage medium. However, it only supports ephemeral volumes. i.e. pod scheduling is not tied to volume provisioning. Therefore, if a pod is rescheduled or restarted, it might end up on a node where the data is not available. However, since HostPath volumes are ephemeral, pod startup will go on without raising any errors.
HostPath volumes cannot be provisioned and managed via PVC resources. It is always provisioned either manually as a PV or directly specified in the PodSpec.
The high consistency and performance benefits of DirectCSI come with the limitation that once provisioned, volumes cannot be moved to other nodes i.e. volumes are sticky to nodes.
Use of direct-csi
driver is governed by the GNU AGPLv3 license that can be found in the LICENSE file.
Important: Report security issues to [email protected]. Please do not report security issues here.