Skip to content

Commit aa571fb

Browse files
committed
Add content in job.md
* Add description to make it easy to read. * Distinguish between 'command'and 'output'. * Add the code blocks to the Markdown spec.
1 parent 8279881 commit aa571fb

File tree

1 file changed

+7
-3
lines changed
  • content/en/docs/concepts/workloads/controllers

1 file changed

+7
-3
lines changed

content/en/docs/concepts/workloads/controllers/job.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ You can run the example with this command:
3838
```shell
3939
kubectl apply -f https://kubernetes.io/examples/controllers/job.yaml
4040
```
41+
The output is similar to this:
4142
```
4243
job.batch/pi created
4344
```
@@ -47,6 +48,7 @@ Check on the status of the Job with `kubectl`:
4748
```shell
4849
kubectl describe jobs/pi
4950
```
51+
The output is similar to this:
5052
```
5153
Name: pi
5254
Namespace: default
@@ -91,6 +93,7 @@ To list all the Pods that belong to a Job in a machine readable form, you can us
9193
pods=$(kubectl get pods --selector=job-name=pi --output=jsonpath='{.items[*].metadata.name}')
9294
echo $pods
9395
```
96+
The output is similar to this:
9497
```
9598
pi-5rwd7
9699
```
@@ -398,10 +401,11 @@ Therefore, you delete Job `old` but _leave its pods
398401
running_, using `kubectl delete jobs/old --cascade=false`.
399402
Before deleting it, you make a note of what selector it uses:
400403

401-
```
404+
```shell
402405
kubectl get job old -o yaml
403406
```
404-
```
407+
The output is similar to this:
408+
```yaml
405409
kind: Job
406410
metadata:
407411
name: old
@@ -420,7 +424,7 @@ they are controlled by Job `new` as well.
420424
You need to specify `manualSelector: true` in the new Job since you are not using
421425
the selector that the system normally generates for you automatically.
422426

423-
```
427+
```yaml
424428
kind: Job
425429
metadata:
426430
name: new

0 commit comments

Comments
 (0)