Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Specify if a pvc should be pod-level or deployment level? #58176
When dynamically creating a pvc and then referencing it from within a deployment, this claim becomes global across the deployment. So if I increase the deployment to more than one pod, everything from pod no. 2 onwards will fail as it the other pods will also attempt to claim the volume, but will be unable to do.
I want to be able to dynamically create a pv per pod, so that it provisions and tears down the disk as the pod is created and destroyed.
Is this currently possible? Or is it a feature request?
I took a look at that, but I cannot get it to work. For example, using the example provided on the documentation
I get the following:
(I then have to delete the nginx service )
Is there something I need to add or apply to the cluster to get StatefulSets working?
Had to change top of the yaml to
But it seems to work now.
I'm noticing that it is not deleting the pvcs and pvs if I delete the sts - so if I create a sts, it will create the pvc and pv for the first pod as expected. If I scale up it will create pvc and pv for that one, but if I delete the sts entirely, all the pvcs and pvs are not deleted. is this intended?
Issues go stale after 90d of inactivity.
If this issue is safe to close now please do so with
Send feedback to sig-testing, kubernetes/test-infra and/or fejta.