Vitastor has a CSI plugin for Kubernetes which supports RWO (and block RWX) volumes.

To deploy it, take manifests from csi/deploy/ directory, put your Vitastor configuration in 001-csi-config-map.yaml, configure storage class in 009-storage-class.yaml and apply all NNN-*.yaml manifests to your Kubernetes installation:

for i in ./???-*.yaml; do kubectl apply -f $i; done

After that you’ll be able to create PersistentVolumes.

Important: For best experience, use Linux kernel at least 5.15 with VDUSE kernel modules enabled (vdpa, vduse, virtio-vdpa). If your distribution doesn’t have them pre-built - build them yourself (instructions), I promise it’s worth it :-). When VDUSE is unavailable, CSI driver uses NBD to map Vitastor devices. NBD is slower and prone to timeout issues: if Vitastor cluster becomes unresponsible for more than nbd_timeout, the NBD device detaches and breaks pods using it.

Features

Vitastor CSI supports:

  • Kubernetes starting with 1.20 (or 1.17 for older vitastor-csi <= 1.1.0)
  • Filesystem RWO (ReadWriteOnce) volumes. Example: PVC, pod
  • Raw block RWX (ReadWriteMany) volumes. Example: PVC, pod
  • Volume expansion
  • Volume snapshots. Example: snapshot class, snapshot, clone
  • VDUSE (preferred) and NBD device mapping methods
  • Upgrades with VDUSE - new handler processes are restarted when CSI pods are restarted themselves
  • VDUSE daemon auto-restart - handler processes are automatically restarted if they crash due to a bug in Vitastor client code
  • Multiple clusters by using multiple configuration files in ConfigMap.

Remember that to use snapshots with CSI you also have to install Snapshot Controller and CRDs.