Skip to content

A Container Storage Interface (CSI) plugin for Lustre parallel file systems, allowing Kubernetes workloads to use high-performance Lustre storage backends.

License

Notifications You must be signed in to change notification settings

klustrefs/klustre-csi-plugin

Repository files navigation

KlustreFS logo

Klustre CSI Plugin

CI Rust Code Quality License

A Container Storage Interface (CSI) plugin for Lustre parallel file systems, allowing Kubernetes workloads to use high-performance Lustre storage backends.

Overview

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.

Current Capabilities

  • Mounts and unmounts Lustre shares on Kubernetes worker nodes using the Lustre client.
  • Supports Lustre's ReadWriteMany semantics for workloads that share mounts across pods.

Limitations

  • Dynamic provisioning workflows (CreateVolume, DeleteVolume, ControllerPublish / Unpublish).
  • Snapshots, expansion, and metrics (CreateSnapshot, NodeExpandVolume, NodeGetVolumeStats, etc.).

Prerequisites

Kubernetes Cluster

  • Kubernetes 1.20+ with the CSI spec v1.5 or newer.
  • The API server and kubelets must allow privileged pods.

Worker Nodes

  • Lustre client packages installed (mount.lustre, kernel modules, etc.).
  • Network connectivity to the Lustre shares.

Quick Start

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-system

Mount an Existing Lustre Share

Define 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-pvc

Development & Contributing

See CONTRIBUTING.md for build/lint instructions, container image workflows, command-line argument reference, and contribution guidelines.

Authors

License

Licensed under the Apache License, Version 2.0.

About

A Container Storage Interface (CSI) plugin for Lustre parallel file systems, allowing Kubernetes workloads to use high-performance Lustre storage backends.

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors 2

  •  
  •