The local volume static provisioner manages PersistentVolume lifecycle for pre-allocated disks by detecting and creating PVs for each local disk on the host, and cleaning up the disks when released. It does not support dynamic provisioning.
- Project status: GA (since Kubernetes 1.14)
- Overview
- User Guide
- Version Compatibility
- Feature Status
- E2E Tests
- Community, Discussion, Contribution, and Support
Local persistent volumes allow users to access local storage through the standard PVC interface in a simple and portable way. The PV contains node affinity information that the system uses to schedule pods to the correct nodes.
An external static provisioner is provided here to help simplify local storage management once the local volumes are configured. Note that the local storage provisioner is different from most provisioners and does not support dynamic provisioning. Instead, it requires that administrators preconfigure the local volumes on each node and if volumes are supposed to be:
- Filesystem volumeMode (default) PVs — mount them under discovery directories.
- Block volumeMode PVs — create a symbolic link under the discovery directory to the block device on the node.
The provisioner will manage the volumes under the discovery directories by creating and cleaning up PersistentVolumes for each volume.
Note
When the node hosting a local PV is deleted, the data is likely lost, but the PV object still exists — the system will indefinitely try to schedule the Pod to the deleted node. See the local volume node cleanup documentation for how to make your workloads automatically recover from node deletion.
To get started with local static provisioning, follow the getting started guide to bring up a Kubernetes cluster with some local disks, deploy local-volume-provisioner to provision local volumes, and use PVC in your pod to request a local PV.
See the operations documentation for preparing, setting up, and cleaning up local volumes on the nodes.
See the Helm documentation for how to deploy and configure local-volume-provisioner in a Kubernetes cluster with Helm.
If you want to manage the provisioner with plain YAML files, you can refer to the example YAMLs. Helm generated YAMLs are good sources of examples too. See provisioner configuration for a full explanation of all options.
See the upgrading documentation for how to upgrade the provisioner version or update configuration in a Kubernetes cluster.
See FAQs.
See Best Practices.
Recommended provisioner versions with Kubernetes versions:
| Provisioner Version | K8s Version |
|---|---|
| 2.8.0 | 1.21+ |
| 2.7.0 | 1.21+ |
| 2.6.0 | 1.12+ |
Also see known issues and CHANGELOG.
- Local block devices as a volume source, with partitioning and filesystem formatting
- Dynamic provisioning for shared local persistent storage
- Local PV health monitoring, taints and tolerations
- Inline PV (use dedicated local disk as ephemeral storage)
Run ./hack/e2e.sh -h to view help.
- TestGrid sig-storage-local-static-provisioner dashboard.
- Image build pipeline: post-sig-storage-local-static-provisioner-push-images
Learn how to engage with the Kubernetes community on the community page.
You can reach the maintainers of this project at:
Participation in the Kubernetes community is governed by the Kubernetes Code of Conduct.