A Container Storage Interface (CSI) plugin for Lustre parallel file systems, allowing Kubernetes workloads to use high-performance Lustre storage backends.
The KlustreFS CSI plugin connects Kubernetes workloads to Lustre shares by using the Lustre client available on worker nodes to mount and unmount whenever a PersistentVolume and PersistentVolumeClaim are created or deleted.
- Mounts and unmounts Lustre shares on Kubernetes worker nodes using the Lustre client.
- Supports Lustre's
ReadWriteManysemantics for workloads that share mounts across pods.
- Dynamic provisioning workflows (
CreateVolume,DeleteVolume,ControllerPublish/Unpublish). - Snapshots, expansion, and metrics (
CreateSnapshot,NodeExpandVolume,NodeGetVolumeStats, etc.).
- Kubernetes 1.20+ with the CSI spec v1.5 or newer.
- The API server and kubelets must allow privileged pods.
- Lustre client packages installed (
mount.lustre, kernel modules, etc.). - Network connectivity to the Lustre shares.
Use the Kubernetes manifests provided in manifests/ or Helm chart from the klustrefs/helm-charts repository if you prefer Helm.
kubectl apply -f manifests/Validate the rollout:
kubectl get pods -n klustre-systemDefine a PersistentVolume that points at your Lustre export and bind it with a PersistentVolumeClaim.
When a pod uses that PVC, the driver reads volumeAttributes.source (for example
10.0.0.1@tcp0:/lustre-fs) and mounts the share inside the container.
apiVersion: v1
kind: PersistentVolume
metadata:
name: lustre-static-pv
spec:
capacity:
storage: 10Gi
accessModes:
- ReadWriteMany
persistentVolumeReclaimPolicy: Retain
csi:
driver: lustre.csi.klustrefs.io
volumeHandle: lustre-static-pv
volumeAttributes:
source: 10.0.0.1@tcp0:/lustre-fs
mountOptions: flock,user_xattr
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: lustre-static-pvc
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 10Gi
volumeName: lustre-static-pv
storageClassName: "klustre-csi-static"
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: lustre-demo
spec:
replicas: 1
selector:
matchLabels:
app: lustre-demo
template:
metadata:
labels:
app: lustre-demo
spec:
containers:
- name: app
image: busybox
command: ["sleep", "infinity"]
volumeMounts:
- name: lustre-share
mountPath: /mnt/lustre
volumes:
- name: lustre-share
persistentVolumeClaim:
claimName: lustre-static-pvcSee CONTRIBUTING.md for build/lint instructions, container image workflows, command-line argument reference, and contribution guidelines.
Licensed under the Apache License, Version 2.0.