Skip to content

local-path

k3s local-path provisioner. Provides volume with one default StorageClass and any cluster-defined classes.

providers.volume = apps.local-path.main;
apps.local-path.main = {
defaultPath = "/var/lib/local-path";
classes.fast-essential.nodePath = "/var/lib/local-path/fast";
};

Provides

volume5 options
  • <name>.accessModeslist of string

    Access modes for the PVC.

    Default
    [ "ReadWriteOnce" ]
  • <name>.classnull or string

    Storage class alias, resolved by the volume provider.

    Default
    null
  • <name>.pathstring

    Mount path this claim is bound to in the consumer's pod.

  • <name>.sizenull or string

    Requested size, such as 10Gi. Defaults to the size the volume provider assigns.

    Default
    null
  • providernull or (podule provider reference (apps.<type>.<instance> or impl.<contract>.<name>))

    Overrides providers.volume for this need.

    Default
    null

Needs

None.

  • classNamestring

    Default StorageClass. Claims without a class use it.

    Default
    "local-path"
  • classesattribute set of (submodule)

    Extra StorageClasses defined by the cluster.

    Default
    { }
    Example
    { fast-essential.nodePath = "/mnt/storage/fast/essential/kubernetes"; }
  • classes.<name>.nodePathnull or string

    Host directory that backs claims of this class. Empty uses the first path in the provisioner config.

    Default
    null
  • classes.<name>.reclaimPolicyone of "Retain", "Delete"

    What happens to the backing directory when a claim is deleted.

    Default
    "Retain"
  • classes.<name>.storageClassNamestring

    StorageClass object name. Defaults to the class alias.

    Default
    "‹name›"
  • classes.<name>.volumeBindingModeone of "WaitForFirstConsumer", "Immediate"

    When a claim of this class binds to a volume.

    Default
    "WaitForFirstConsumer"
  • defaultPathstring

    Host directory for the default StorageClass.

    Default
    "/var/lib/rancher/k3s/storage"
  • helperImagestring

    Image the provisioner uses to create and delete volume directories on the node.

    Default
    "rancher/mirrored-library-busybox:1.37.0"
  • imagestring

    Provisioner image. nixpkgs does not ship this program.

    Default
    "rancher/local-path-provisioner:v0.0.37"
  • nodeslist of string

    Node names that share the path list. Other nodes use the same list.

    Default
    [ ]
  • priorityClassnull or string

    PriorityClass for the provisioner pod. Null omits it.

    Default
    "system-node-critical"
  • provisionerstring

    Provisioner name recorded in the StorageClasses.

    Default
    "rancher.io/local-path"