Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--show-all is now defaulted to true and deprecated #7749

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,10 @@ 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 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