Managed Lustre CSI driver reference


The following manifests describe supported CSI driver fields in the Storage Class and Persistent Volume resources.

Storage Class

The following manifest includes all of the supported fields in the Storage Class.

apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: lustre-csi-example-storage-class
provisioner: lustre.csi.storage.gke.io
parameters:
  network: VPC_NETWORK # optional
  filesystem: LUSTRE_FILESYSTEM_NAME # optional
  labels: KEY_1=VALUE_1,KEY_2=VALUE_2,...,KEY_N=VALUE_N # optional
  description: DESCRIPTION # optional
  perUnitStorageThroughput: 125 | 250 | 500 | 1000  # required
volumeBindingMode: WaitForFirstConsumer | Immediate # default is Immediate
allowedTopologies:
- matchLabelExpressions:
  - key: topology.gke.io/zone
    values:
    - ZONE_1
    - ZONE_2
mountOptions:
  - LUSTRE_MOUNT_OPTIONS

Replace the following values:

  • network: optional. The Virtual Private Cloud (VPC) network in which to create the Managed Lustre instance. If this property is not specified, the default network is used.

    To create a Managed Lustre instance in a shared VPC network, the full name of the network must be provided. For example, projects/PROJECT_ID/global/networks/VPC_NETWORK_NAME.

  • filesystem: optional. Specifies the fsname for the Managed Lustre instance. This must be an alphanumeric string of up to eight characters, beginning with an alphabetic character. If a value is not provided, the CSI driver generates an fsname with the format "lfsNNNNN" (for example, "lfs97603").

  • labels: optional. Managed Lustre supports labels per instance, as a map of key-value pairs. The Managed Lustre CSI driver lets you attach user-provided labels to the instance.

  • description: optional. A description of the instance. Must be 2,048 characters or fewer.

  • perUnitStorageThroughput: specifies the per-unit storage throughput (MB/s/TiB) for the instance. Supported values are 125, 250, 500, and 1000. The default is 1000.

  • allowTopologies: optional. Managed Lustre instances are zonal resources. If this property is not specified, the Managed Lustre instance is created in the same zone as the CSI controller Driver Pod, and the volume binding mode defaults to Immediate.

    If WaitForFirstConsumer is specified, the topology is set to where the Pod is scheduled. However, this setting can cause Pods to be blocked while they wait for a volume to be provisioned.

    The Managed Lustre CSI driver supports the topology feature to ensure that persistent volumes and Pods are placed in the allowed topologies, based on the topology provided in the StorageClass.

  • mountOptions: optional. Specifies mount.lustre mount options. Managed Lustre volumes inherit these mount options from the StorageClass in the pv.spec.mountOptions field.

Persistent Volume

The following manifest includes all of the supported fields in the Persistent Volume.

apiVersion: v1
kind: PersistentVolume
metadata:
 name: preprov-pv
 annotations:
   pv.kubernetes.io/provisioned-by: lustre.csi.storage.gke.io
spec:
 mountOptions:
   - LUSTRE_MOUNT_OPTIONS
   ...
 storageClassName: ""
 capacity:
   storage: CAPACITY
 accessModes:
   - ReadWriteMany
 persistentVolumeReclaimPolicy: Retain
 volumeMode: Filesystem
 csi:
   driver: lustre.csi.storage.gke.io
   volumeHandle: EXISTING_LUSTRE_INSTANCE_NAME
   volumeAttributes:
     ip: EXISTING_LUSTRE_IP_ADDRESS
     filesystem: EXISTING_LUSTRE_FSNAME

Replace the following values:

  • capacity.storage: the capacity of the Managed Lustre instance. The minimum size is 18,000 GiB, incremented in multiples of 9,000 GiB. The maximum instance size is 954,000 GiB.
  • mountOptions: Specifies mount.lustre mount options. This value is inherited from the mountOptions field in the StorageClass.
  • csi.volumeHandle: an exclusive identifier for a Managed Lustre instance. Must use the following format: PROJECT_ID/LOCATION/INSTANCE_NAME.
  • csi.volumeAttributes.ip: the IP address of the Managed Lustre instance, used for mounting.
  • csi.volumeAttributes.filesystem: the file system name of the Managed Lustre instance, which is an eight-character identifier.