Add a case to illustrate how to use `kubectl get -o custom-columns`

pull/564/head
WanLinghao 2019-02-03 10:56:47 +08:00
parent a3c14ecfa5
commit 4a1a2c9017
1 changed files with 3 additions and 0 deletions

View File

@ -118,6 +118,9 @@ var (
# Return only the phase value of the specified pod. # Return only the phase value of the specified pod.
kubectl get -o template pod/web-pod-13je7 --template={{.status.phase}} kubectl get -o template pod/web-pod-13je7 --template={{.status.phase}}
# List resource information in custom columns.
kubectl get pod test-pod -o custom-columns=CONTAINER:.spec.containers[0].name,IMAGE:.spec.containers[0].image
# List all replication controllers and services together in ps output format. # List all replication controllers and services together in ps output format.
kubectl get rc,services kubectl get rc,services