Kubernetes: NFS with StatefulSets Kubernetes: NFS with StatefulSets kubernetes kubernetes

Kubernetes: NFS with StatefulSets


The good news is that yes Kubernetes now supports the dynamic creation of Persistent volumes as described in the following posting:

The bad news is that this feature does not appear to support NFS... Which means a certain amount of sense considering each volume needs to be manually created even without Kubernetes involved :-(

Having said that Google found the following link that suggests there might be an unofficial way to provision NFS dynamically.

Hope these links help.


This is a work in progress I came back to just yesterday (my solution) but my advice if it suits your purposes (or anyone finding this later) is to check out GlusterFS and Heketi.

Information is included below but the TLDR is that GlusterFS is your NFS, Heketi can autoprovision the rest. My github repo automates the setup... it's ugly... but it works for me and I'll be making it less ugly with what I know now.


GlusterFS is a free and open source scalable network filesystem. https://github.com/gluster/glusterfshttps://www.gluster.org/

RESTful based volume management framework for GlusterFS https://github.com/heketi/heketi


https://github.com/stevenaldinger/gke-glusterfs-heketi