Skip to content

Commit 69cf268

Browse files
authored
Merge pull request kubernetes#73669 from WanLinghao/add_get_case
Add a case to illustrate how to use `kubectl get -o custom-columns`
2 parents 162b79d + 4a1a2c9 commit 69cf268

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pkg/kubectl/cmd/get/get.go

+3
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,9 @@ var (
118118
# Return only the phase value of the specified pod.
119119
kubectl get -o template pod/web-pod-13je7 --template={{.status.phase}}
120120
121+
# List resource information in custom columns.
122+
kubectl get pod test-pod -o custom-columns=CONTAINER:.spec.containers[0].name,IMAGE:.spec.containers[0].image
123+
121124
# List all replication controllers and services together in ps output format.
122125
kubectl get rc,services
123126

0 commit comments

Comments
 (0)