stackoverflow: Is there an efficient way to check the usage for PV/PVC in Kubernetes

image.png
If there's a running pod with mounted PV from the PVC,
kubectl -n <namespace> exec <pod-name> -- df -ah
...will list all file systems, including the mounted volumes, and their free disk space.
實際應(yīng)用:
kubectl -n mongodb exec mongodb-0 -- df -ah

image.png