stackoverflow: Is there an efficient way to check the usage for PV/PVC in Kubernetes
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.
实际应用:
kubectl -n mongodb exec mongodb-0 -- df -ah