Static provisioner of local volumes
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
Kubernetes Prow Robot 195ef8532c
Merge pull request #321 from andyzhangx/trivy
1 day ago
.github test: add Trivy vulnerability scanner github action 2 days ago
cmd chore: replace k8s.gcr.io with registry.k8s.io 3 weeks ago
deployment cleanup: remove unused service example 1 week ago
docs doc: fix spelling issues 4 weeks ago
examples chore: replace k8s.gcr.io with registry.k8s.io 3 weeks ago
hack fix: ltsc2022 image distro 1 week ago
helm Update helm generated files 2 months ago
pkg doc: fix spelling issues 4 weeks ago
test/e2e Custom ClusterRole in the e2e tests that replaces the system:pv role 2 months ago
third_party/multiarch/qemu-user-static Support cross-building 3 years ago
vendor fix: golang.org/x/crypto for CVE-2022-27191 2 days ago
.dockerignore Support cross-building 3 years ago
.gitignore Add scripts to verify 3 years ago
CHANGELOG.md v2.4.0: update CHANGELOG.md 1 year ago
CONTRIBUTING.md modify the error url of contributor-cheatsheet 2 years ago
KNOWN_ISSUES.md Reorg local volume known issues and versions for fixes 3 years ago
LICENSE Initial commit 3 years ago
Makefile test: add Trivy vulnerability scanner github action 2 days ago
OWNERS Update OWNERS 4 weeks ago
README.md Update README.md 1 week ago
RELEASE.md Update release instructions, helm chart action only works with tags 2 months ago
SECURITY_CONTACTS Initial commit 3 years ago
TODO.md - operations and faqs docs 3 years ago
cloudbuild.yaml chore: upgrade gcb-docker-gcloud version 1 week ago
code-of-conduct.md Initial commit 3 years ago
go.mod fix: golang.org/x/crypto for CVE-2022-27191 2 days ago
go.sum fix: golang.org/x/crypto for CVE-2022-27191 2 days ago

README.md

Local Persistence Volume Static Provisioner

Coverage Status

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.

Table of Contents

Overview

Local persistent volumes allows 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

  1. Filesystem volumeMode (default) PVs - mount them under discovery directories.
  2. Block volumeMode PVs - create a symbolic link under 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.

User Guide

Getting started

To get started with local static provisioning, you can follow our 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.

Managing your local volumes

See our operations documentation which contains of preparing, setting up and cleaning up local volumes on the nodes.

Deploying

See our helm documentation for how to deploy and configure local-volume-provisioner in Kubernetes cluster with helm.

If you want to manage provisioner with plain YAML files, you can refer to our example yamls. helm generated yamls are good sources of examples too. Here is a full explanation of provisioner configuration.

Upgrading

See our upgrading documentation for how to upgrade provisioner version or update configuration in Kubernetes cluster.

FAQs

See FAQs.

Best Practices

See Best Practices.

Version Compatibility

Recommended provisioner versions with Kubernetes versions

Provisioner version K8s version Reason
2.4.0 1.12+ fs on block support
2.2.0 1.10 Beta API default, block
2.0.0 1.8, 1.9 Mount propagation
1.0.1 1.7

K8s Feature Status

Also see known issues and CHANGELOG.

1.14: GA

  • No new features added

1.12: Beta

  • Added support for automatically formatting a filesystem on the given block device in localVolumeSource.path

1.10: Beta

  • New PV.NodeAffinity field added.
  • Important: Alpha PV NodeAffinity annotation is deprecated. Users must manually update their PVs to use the new NodeAffinity field or run a one-time update job.
  • Alpha: Raw block support added.

1.9: Alpha

  • New StorageClass volumeBindingMode parameter that will delay PVC binding until a pod is scheduled.

1.7: Alpha

  • New local PersistentVolume source that allows specifying a directory or mount point with node affinity.
  • Pod using the PVC that is bound to this PV will always get scheduled to that node.

Future features

  • Local block devices as a volume source, with partitioning and fs formatting
  • Dynamic provisioning for shared local persistent storage
  • Local PV health monitoring, taints and tolerations
  • Inline PV (use dedicated local disk as ephemeral storage)

E2E Tests

Running

Run ./hack/e2e.sh -h to view help.

View CI Results

Check testgrid sig-storage-local-static-provisioner dashboard.

Community, discussion, contribution, and support

Learn how to engage with the Kubernetes community on the community page.

You can reach the maintainers of this project at:

Code of conduct

Participation in the Kubernetes community is governed by the Kubernetes Code of Conduct.