Skip to content

Commit c8d58f3

Browse files
Update cheatsheet.md
adding a custom output to format output by listing Images per Pod in table.
1 parent 7a8ef52 commit c8d58f3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

content/en/docs/reference/kubectl/cheatsheet.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,8 @@ Examples using `-o=custom-columns`:
374374
```bash
375375
# All images running in a cluster
376376
kubectl get pods -A -o=custom-columns='DATA:spec.containers[*].image'
377+
# All images running in namespace: default, grouped by Pod
378+
kubectl get pods --namespace default --output=custom-columns="NAME:.metadata.name,IMAGE:.spec.containers[*].image"
377379

378380
# All images excluding "k8s.gcr.io/coredns:1.6.2"
379381
kubectl get pods -A -o=custom-columns='DATA:spec.containers[?(@.image!="k8s.gcr.io/coredns:1.6.2")].image'

0 commit comments

Comments
 (0)