Print PVC names and bound storage sizes.

Section: JSONPath Output Recipes

List pvc capacities

bash
bash
kubectl get pvc -n data -o jsonpath='{range .items[*]}{.metadata.name}{"\t"}{.status.capacity.storage}{"\n"}{end}'
Explanation

Print PVC names and bound storage sizes.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing JSONPath Output Recipes
List pod names
Print all pod names in a namespace.
OpenIn sheetbashsame section
List pod images
Print pod names and container images.
OpenIn sheetbashsame section
List node internal IPs
Print node names with internal IPs.
OpenIn sheetbashsame section
List service ports
Print service port mappings.
OpenIn sheetbashsame section
List secret keys
Print the secret data object keys and values.
OpenIn sheetbashsame section
List pod restart counts
Print pod restart counts.
OpenIn sheetbashsame section