Reputation: 57
I use NFS in kubernetes cluster.
Now, I create 5 PVCs in with the same StorageClass successfully, and each PVC claims uses 100G. so a total of 500G.
Q: Why can I create 5 PVCs?
NFS provides 300G physical storage actually.
Q: What happens if a PVC actually occupies more than its declared request(100G<pvc<300G)?
Upvotes: 1
Views: 627
Reputation: 19514
When you run create command its not yet completed is like job accepted, then k8s will try to match your claim with available PersistentVolume.
After you create pvc run
kubectl get pvc
ANd make sure that status is bound, if its not then k8s cant find a storage for your claim
Regartding second question. If you mount that PVC to pod then pod wont be able to write more than you allocated
Upvotes: 0
Reputation: 61669
Q: Why can I create 5 PVCs?
You might want to check š the PVs allocated (Persistent Volumes). You can create a PVC but it doesn't mean that the PV will get allocated. A PVC is a Persistent Volume Claim but it doesn't mean you always get it.
kubectl get pv --all-namespaces
Q: What happens if a PVC actually occupies more than its declared request(100G<pvc<300G)?
If the combined PVs exceed 300G well you won't be able to store passed that in your case.
If for some reason you have PVs that exceed your total space, you might actually have a bug (ā)
āļø
Upvotes: 1