Skip to content

Latest commit

 

History

History
52 lines (38 loc) · 2.94 KB

kubernetes.en.md

File metadata and controls

52 lines (38 loc) · 2.94 KB

Documentation → Installation → Kubernetes CSI


Читать на русском

Kubernetes CSI

Vitastor has a CSI plugin for Kubernetes which supports block-based and VitastorFS-based volumes.

Block-based volumes may be formatted and mounted with a normal FS (ext4 or xfs). Such volumes only support RWO (ReadWriteOnce) mode.

Block-based volumes may also be left without FS and attached into the container as a block device. Such volumes also support RWX (ReadWriteMany) mode.

VitastorFS-based volumes use a clustered file system and support FS-based RWX (ReadWriteMany) mode. However, such volumes don't support quotas and snapshots.

To deploy the CSI plugin, 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, with kernels older than 5.19, unmountable if the cluster becomes unresponsible.

Features

Vitastor CSI supports:

  • Kubernetes starting with 1.20 (or 1.17 for older vitastor-csi <= 1.1.0)
  • Block-based FS-formatted RWO (ReadWriteOnce) volumes. Example: PVC, pod
  • Raw block RWX (ReadWriteMany) volumes. Example: PVC, pod
  • VitastorFS-based volumes RWX (ReadWriteMany) volumes. Example: storage class
  • 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.