I create a PV with 20G and a PVC claiming 10G. The PVC bound to PV successfully. When I check the PVC using kubectl get pvc or kubectl describe pvc ..., the capacity is 20G not 10G. In fact, I cannot find anything reflecting that I only request 10G. When I attach the pvc to a pod, does the container in the pod have access to a 10G space or 20G space?
The PVC will be used to match something that satisfy it, but if only volumes with more space are available, it will be assigned to those. This is pretty much on purpose (so PVC is not coupled with pvs), and documented, I think.
Also, this is very easy to test: use more than requested. Then, you will see :). My bet is that you can use the entire PV bounded to the PVC. But let us know
I did an experiment: create 1 * 20G pv and 2 * 10G pvc. The first pvc claimed the pv and second pvc would stay PENDING until I created another pv which satisfied it.
Conclusion: a pvc will fully obtain a pv not part of it. whatever in the requests is just a filter for pvc to look for a pv.
i’m still confused about your case because the relationship between the PVC and the PV is 1:1 so it’s clear that u can’t bind the 2nd PVC to the PV.
so I think if the PVC requests less capacity than the PV has, the remaining capacity will be unavailable.