NFS Ganesha Server and Volume Provisioner.
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 abfbe652e3
Merge pull request #89 from yselkowitz/enable-ibm-p-z
6 months ago
.github/workflows Separate base image for nfs-ganesha 7 months ago
charts/nfs-server-provisioner feat(chart): allow configuration of k8s scheduling priority 7 months ago
cmd/nfs-provisioner Disable leader election 2 years ago
deploy Use nfs-ganesha as base for container image 6 months ago
docs chore(doc): update references of container registry of nfs-provisioner from to 1 year ago
pkg add '--nopidfile' to dbus-daemon start command 1 year ago
release-tools images: use k8s-staging-test-infra/gcb-docker-gcloud 7 months ago
test/e2e update github references to new repo 2 years ago
vendor add dependencies via go mod vendor 2 years ago Enable ppc64le and s390x 8 months ago Enable ppc64le and s390x in prow builds 8 months ago docs: make github links reference HEAD instead of master 11 months ago Update template files to include repo-specific info 2 years ago
Dockerfile Relocate Dockerfile now supporting arm/arm64/amd64 9 months ago
LICENSE Initial commit 2 years ago
Makefile Relocate Dockerfile now supporting arm/arm64/amd64 9 months ago
OWNERS Add kvaps as approver 2 years ago
OWNERS_ALIASES Symlink OWNERS_ALIASES so bot understands: ln -s ./release-tools/KUBERNETES_CSI_OWNERS_ALIASES ./OWNERS_ALIASES 10 months ago docs: make github links reference HEAD instead of master 11 months ago Merge branch 'master' of /home/kiran_mova_mayadata_io/temp/migrate/external-storage into init-code 2 years ago
SECURITY_CONTACTS Update template files to include repo-specific info 2 years ago
cloudbuild.yaml fix the file name for cloudbuild.yaml 2 years ago Initial commit 2 years ago
ct.yaml Add github action to release helm charts 10 months ago
go.mod update github references to new repo 2 years ago
go.sum Update nfs to lib 4 and client-go w GetReference fix 2 years ago

NFS Ganesha server and external provisioner

nfs-ganesha-server-and-external-provisioner is an out-of-tree dynamic provisioner for Kubernetes 1.14+. You can use it to quickly & easily deploy shared storage that works almost anywhere. Or it can help you write your own out-of-tree dynamic provisioner by serving as an example implementation of the requirements detailed in the proposal.

It works just like in-tree dynamic provisioners: a StorageClass object can specify an instance of nfs-ganesha-server-and-external-provisioner to be its provisioner like it specifies in-tree provisioners such as GCE or AWS. Then, the instance of nfs-ganesha-server-and-external-provisioner will watch for PersistentVolumeClaims that ask for the StorageClass and automatically create NFS-backed PersistentVolumes for them. For more information on how dynamic provisioning works, see the docs or this blog post.

Note: This repository was migrated from Some of the following instructions will be updated once the build and release automtion is setup. To test container image built from this repository, you will have to build and push the nfs-provisioner image using the following instructions.

make build
make container
# `nfs-provisioner:latest` will be created. 
# To upload this to your customer registry, say ``, you can use
# docker tag nfs-provisioner:latest
# docker push


Choose some volume for your nfs-ganesha-server-and-external-provisioner instance to store its state & data in and mount the volume at /export in deploy/kubernetes/deployment.yaml. It doesn't have to be a hostPath volume, it can e.g. be a PVC. Note that the volume must have a supported file system on it: any local filesystem on Linux is supported & NFS is not supported.

    - name: export-volume
      mountPath: /export
  - name: export-volume
      path: /tmp/nfs-provisioner

Choose a provisioner name for a StorageClass to specify and set it in deploy/kubernetes/deployment.yaml

  - ""

Create the deployment.

$ kubectl create -f deploy/kubernetes/deployment.yaml
serviceaccount/nfs-provisioner created
service "nfs-provisioner" created
deployment "nfs-provisioner" created

Create ClusterRole, ClusterRoleBinding, Role and RoleBinding (this is necessary if you use RBAC authorization on your cluster, which is the default for newer kubernetes versions).

$ kubectl create -f deploy/kubernetes/rbac.yaml created created created created

Create a StorageClass named "example-nfs" with provisioner:

$ kubectl create -f deploy/kubernetes/class.yaml
storageclass "example-nfs" created

Create a PersistentVolumeClaim with storageClassName: example-nfs.

$ kubectl create -f deploy/kubernetes/claim.yaml
persistentvolumeclaim "nfs" created

A PersistentVolume is provisioned for the PersistentVolumeClaim. Now the claim can be consumed by some pod(s) and the backing NFS storage read from or written to.

$ kubectl get pv
NAME                                       CAPACITY   ACCESSMODES   RECLAIMPOLICY   STATUS      CLAIM         REASON    AGE
pvc-dce84888-7a9d-11e6-b1ee-5254001e0c1b   1Mi        RWX           Delete          Bound       default/nfs             23s

Deleting the PersistentVolumeClaim will cause the provisioner to delete the PersistentVolume and its data.

Deleting the provisioner deployment will cause any outstanding PersistentVolumes to become unusable for as long as the provisioner is gone.


To deploy nfs-ganesha-server-and-external-provisioner on a Kubernetes cluster see Deployment.

To use nfs-ganesha-server-and-external-provisioner once it is deployed see Usage.


Releases done here in external-storage will not have corresponding git tags (external-storage's git tags are reserved for versioning the library), so to keep track of releases check this README, the changelog, or GCR

Writing your own

Go here for an example of how to write your own out-of-tree dynamic provisioner.


The source code in this repository was migrated from kubernetes-incubator/external-storage. We are yet to complete the following migration tasks.

  • Update e2e tests
  • Automate building container images to the new registry
  • Update helm chart

This is still alpha/experimental and will change to reflect the out-of-tree dynamic provisioner proposal

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.