add new examples for fieldSelector when using kubectl get (#6312)

This commit is contained in:
Di Xu
2017-11-14 13:35:17 -06:00
committed by Steve Perry
parent 9f758e6443
commit a20bf030a2
2 changed files with 6 additions and 0 deletions
+3
View File
@@ -119,6 +119,9 @@ $ kubectl get pods --sort-by='.status.containerStatuses[0].restartCount'
$ kubectl get pods --selector=app=cassandra rc -o \
jsonpath='{.items[*].metadata.labels.version}'
# Get all running pods in the namespace
$ kubectl get pods --field-selector=status.phase=Running
# Get ExternalIPs of all nodes
$ kubectl get nodes -o jsonpath='{.items[*].status.addresses[?(@.type=="ExternalIP")].address}'
+3
View File
@@ -242,6 +242,9 @@ $ kubectl get rc,services
// List all daemon sets, including uninitialized ones, in plain-text output format.
$ kubectl get ds --include-uninitialized
// List all pods running on node server01
$ kubectl get pods --field-selector=spec.nodeName=server01
```
`kubectl describe` - Display detailed state of one or more resources, including the uninitialized ones by default.