Fix commands and output of "Running an example job"

* The examples in the jobs user-guide are not longer working because
  the ``labels app=pi`` got removed in commit
  f16668b45f

* The exammples now use the automatic added label ``job-name`` as
  selector for kubectl.
This commit is contained in:
Matthias Schmitz
2016-06-07 11:01:53 +02:00
parent cc6c22b52d
commit 097e93b287
+4 -4
View File
@@ -38,11 +38,11 @@ $ kubectl describe jobs/pi
Name: pi Name: pi
Namespace: default Namespace: default
Image(s): perl Image(s): perl
Selector: app in (pi) Selector: controller-uid=b1db589a-2c8d-11e6-b324-0209dc45a495
Parallelism: 1 Parallelism: 1
Completions: 1 Completions: 1
Start Time: Mon, 11 Jan 2016 15:35:52 -0800 Start Time: Tue, 07 Jun 2016 10:56:16 +0200
Labels: app=pi Labels: controller-uid=b1db589a-2c8d-11e6-b324-0209dc45a495,job-name=pi
Pods Statuses: 0 Running / 1 Succeeded / 0 Failed Pods Statuses: 0 Running / 1 Succeeded / 0 Failed
No volumes. No volumes.
Events: Events:
@@ -56,7 +56,7 @@ To view completed pods of a job, use `kubectl get pods --show-all`. The `--show
To list all the pods that belong to job in a machine readable form, you can use a command like this: To list all the pods that belong to job in a machine readable form, you can use a command like this:
```shell ```shell
$ pods=$(kubectl get pods --selector=app=pi --output=jsonpath={.items..metadata.name}) $ pods=$(kubectl get pods --selector=job-name=pi --output=jsonpath={.items..metadata.name})
echo $pods echo $pods
pi-aiw0a pi-aiw0a
``` ```