Skip to content

Commit 0d4339b

Browse files
committed
chore: user real example, and fix yaml in markdown
1 parent baf9af8 commit 0d4339b

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

docs/book/src/cronjob-tutorial/running.md

+2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ anything just yet.
2525
At this point, we need a CronJob to test with. Let's write a sample to
2626
`config/samples/batch_v1_cronjob.yaml`, and use that:
2727

28+
```yaml
2829
{{#include ./testdata/project/config/samples/batch_v1_cronjob.yaml}}
30+
```
2931

3032
```bash
3133
kubectl create -f config/samples/batch_v1_cronjob.yaml

docs/book/src/cronjob-tutorial/testdata/project/config/samples/batch_v1_cronjob.yaml

+15-2
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,18 @@ kind: CronJob
33
metadata:
44
name: cronjob-sample
55
spec:
6-
# Add fields here
7-
foo: bar
6+
schedule: "*/1 * * * *"
7+
startingDeadlineSeconds: 60
8+
concurrencyPolicy: Allow # explicitly specify, but Allow is also default.
9+
jobTemplate:
10+
spec:
11+
template:
12+
spec:
13+
containers:
14+
- name: hello
15+
image: busybox
16+
args:
17+
- /bin/sh
18+
- -c
19+
- date; echo Hello from the Kubernetes cluster
20+
restartPolicy: OnFailure

0 commit comments

Comments
 (0)