wagz

find pvcs on pods

Oct 5th, 2022
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 0.24 KB | None | 0 0
  1. kubectl get pods --all-namespaces -o=json | jq -c '.items[] | {name: .metadata.name, namespace: .metadata.namespace, claimName: .spec |  select( has ("volumes") ).volumes[] | select( has ("persistentVolumeClaim") ).persistentVolumeClaim.claimName }'
Add Comment
Please, Sign In to add comment