Skip to main content

MooseFS CSI driver

The MooseFS CSI driver is the recommended way to give Kubernetes pods storage on MooseFS. It makes the mounts itself and presents them as PersistentVolume objects. The MooseFS side must admit the nodes before the driver works. Kubernetes describes how. For simpler tasks, a node mount handed to pods as hostPath works without the driver.

The MooseFS CSI driver provisions volumes on demand​

The Container Storage Interface (CSI) is the interface through which Kubernetes gives storage to the workloads that use it. The storage comes from a system that Kubernetes itself does not run. MooseFS has a driver of its own: moosefs-csi on GitHub. The driver lets Kubernetes workloads use MooseFS volumes without a mount prepared by hand on each node.

The driver provides:

  • mounting MooseFS volumes inside pods through FUSE,
  • StorageClass objects that name MooseFS as their provisioner,
  • dynamic provisioning of PersistentVolumeClaim objects.

The driver is deployed as ordinary Kubernetes components and fits the storage workflow that a cluster already has. The MooseFS side of the driver is the same as for any other client. An export entry admits the nodes, with alldirs and admin on it. The volumes are created under a directory tree.

A node that only runs volumes that the CSI driver provides does not need the MooseFS client package. The driver's image includes a MooseFS client of its own. The mounts are made inside the driver's pods.

The size that a claim requests becomes a MooseFS quota on the directory of the volume that the driver creates.

The section mount the claim in a pod shows how a pod mounts the bound claim.

note

A Kubernetes StorageClass and a MooseFS Storage Class are different objects that share a name. The Kubernetes object names the provisioner Kubernetes calls. The MooseFS object decides how many copies of the data MooseFS keeps and where it puts them. Setting the Kubernetes StorageClass says nothing about the MooseFS Storage Class. Setting the MooseFS Storage Class says nothing about the Kubernetes object.