How to use NFS to back volumes?

Has anyone had success using NFS to back volumes in Rancher 2.0? I’m new to Rancher and just deployed Rancher 2.0 in our dev environment to start experimenting with. I have an NFS server that I’d like to use as backing storage for volumes but I can’t find any documentation on this and it’s unclear to me where to start: Is this configured on the k8s level with yaml files, using kubectl, etc., or is this something I do via the rancher web UI, or a combination of both?

Any help to get me pointed/moving in the right direction is welcome!

P.S. - I see several topics under 1.x for ‘Rancher-nfs’ which I’ll dig more into, but my understanding is Rancher 2.0 underneath is fundamentally different from 1.x since it’s building on k8s, so I don’t know how fruitful that avenue will be…

1 Like

Yes, I did. it worked well with a current version of NFS 4. I wasn’t able to get it working with an old NFS3 server.

I created a persistent volume for the cluster, pointing to the NFS server. Selected “Many Nodes Read-Write” under Customize.

Them attached it to various workloads.

1 Like

Hi etlweather,
Appreciate your response; Since my post I’ve gotten it working with a backing NFSv4 server as well. I was over-guessing complexity; it was really quite simple, just a matter of poking around and getting better acquainted with the UI and where Rancher is putting things. If it’s of use to anyone else, I did it all from within the web UI:

  1. Drilled down to: -> Storage -> Persistent Volumes
  2. Then clicked on ‘Add Volume’ and filled out a few fields: Volume Plugin: NFS Share, Path (export path), Server.
  3. Attached various workloads to ‘existing persistent volume’…

…and that was it!

1 Like