question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Is it possible to allow dynamic PV creation for a static NFS share?

See original GitHub issue

Hey there!

I’ve been trying to suss this out from the documentation but I have to admit my brain is a bit mushy after doing so (not your fault, just trying to mentally juggle all of the relevant parts) and figured it might be simplest to just ask:

Is it possible to create a storage class for dynamic PV/PVC provisioning that can use an existing NFS export/share?

My goal essentially boils down to wanting to do what node-manual seems to be more or less designed for, but entirely with a statically-configured StorageClass such that I can simply create PersistentVolumeClaim resources and get the normal dynamic provisioning of PVs on-the-fly. I have a few fixed NFS exports (shared media, general data, yadda yadda) that I want to expose uniformly to various containers, and for my own (perhaps over-the-top) desire for concise, I’d love to avoid having to bake the PV manually for each of those locations. It just feels weird to have to do that.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
tobzcommented, Aug 3, 2022

Yeah, fair enough.

I mostly just wasn’t sure if there was an existing way to push the CSI configuration, when using the node-manual driver, from the PV itself to a storage class that could be used dynamically.

Appreciate the response/rubber ducking. 👍🏻

0reactions
travisghansencommented, Aug 2, 2022

OK, it doesn’t really make sense to include something of that nature in this project (it is arguably very niche). However, leveraging the node-manual features you could fairly easily create your own ‘operator’ (effectively storage class) to achieve this goal.

The idea is the operator would watch select PVCs and create PVs that adhere to the node-manual syntax in an automated fashion.

https://github.com/flant/shell-operator

A little shell mixed with kubectl (in the shell script) would likely be pretty quick.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Kubernetes : NFS and Dynamic NFS provisioning - Medium
The problem with the previous method is that someone has to create each persistence volume for all pvc requests, which can be time...
Read more >
Kubernetes: NFS mount using dynamic volume and Storage ...
Now let's create a small NGINX pod that mounts the NFS export in its web directory. Any files created on the NFS share...
Read more >
Dynamically create PV by using nfs-client-provisioner
Deploy nfs-client-provisioner and then you can dynamically create PV in JCS for Kubernetes.
Read more >
Dynamic Volume Provisioning | Kubernetes
Dynamic volume provisioning allows storage volumes to be created on-demand. Without dynamic provisioning, cluster administrators have to ...
Read more >
Could nfs-client provisioner make PV directory if it's not ...
Our project is successfully using nfs-client provisioner to create dynamic volumes on behalf of a claim. However, for static (e.g. manually ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found