[K8S]Check the usage for PV/PVC

2022-12-04  本文已影响0人  Mokaffee

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.

实际应用:
kubectl -n mongodb exec mongodb-0 -- df -ah

image.png
上一篇 下一篇

猜你喜欢

热点阅读