Skip to content

Commit

Permalink
remove description kubectl --show-all
Browse files Browse the repository at this point in the history
--show-all has been deprecated and set to true by default.
kubernetes/kubernetes#60210
  • Loading branch information
CaoShuFeng committed Mar 1, 2018
1 parent 0c2c9d2 commit 93693b7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/concepts/workloads/controllers/jobs-run-to-completion.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,12 @@ Events:
1m 1m 1 {job-controller } Normal SuccessfulCreate Created pod: pi-dtn4q
```

To view completed pods of a job, use `kubectl get pods --show-all`. The `--show-all` will show completed pods too.
To view completed pods of a job, use `kubectl get pods`.

To list all the pods that belong to a job in a machine readable form, you can use a command like this:

```shell
$ pods=$(kubectl get pods --show-all --selector=job-name=pi --output=jsonpath={.items..metadata.name})
$ pods=$(kubectl get pods --selector=job-name=pi --output=jsonpath={.items..metadata.name})
$ echo $pods
pi-aiw0a
```
Expand Down
4 changes: 2 additions & 2 deletions docs/tasks/job/parallel-processing-expansion.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ do not care to see.)
We can check on the pods as well using the same label selector:

```shell
$ kubectl get pods -l jobgroup=jobexample --show-all
$ kubectl get pods -l jobgroup=jobexample
NAME READY STATUS RESTARTS AGE
process-item-apple-kixwv 0/1 Completed 0 4m
process-item-banana-wrsf7 0/1 Completed 0 4m
Expand All @@ -96,7 +96,7 @@ There is not a single command to check on the output of all jobs at once,
but looping over all the pods is pretty easy:

```shell
$ for p in $(kubectl get pods -l jobgroup=jobexample --show-all -o name)
$ for p in $(kubectl get pods -l jobgroup=jobexample -o name)
do
kubectl logs $p
done
Expand Down

0 comments on commit 93693b7

Please sign in to comment.