Skip to content

Commit b0efabd

Browse files
authored
Merge pull request #87 from Makonike/main
docs: update README.md
2 parents 4a88aaa + 43184ab commit b0efabd

2 files changed

Lines changed: 15 additions & 3 deletions

File tree

README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1462,7 +1462,11 @@ spec:
14621462
containers:
14631463
- name: echo
14641464
image: busybox
1465-
command: [for i in 9 8 7 6 5 4 3 2 1 ; do echo $i ; done]
1465+
command:
1466+
- "/bin/sh"
1467+
args:
1468+
- "-c"
1469+
- "for i in 9 8 7 6 5 4 3 2 1 ; do echo $i ; done"
14661470
```
14671471

14681472
通过下面的命令创建 job,可以通过 `kubectl get pods -w` 来观察 job 创建 pod 的过程和结果。最后可以通过 `logs` 命令查看日志。
@@ -1526,7 +1530,11 @@ spec:
15261530
containers:
15271531
- name: echo
15281532
image: busybox
1529-
command: [for i in 9 8 7 6 5 4 3 2 1 ; do echo $i ; done]
1533+
command:
1534+
- "/bin/sh"
1535+
args:
1536+
- "-c"
1537+
- "for i in 9 8 7 6 5 4 3 2 1 ; do echo $i ; done"
15301538
```
15311539

15321540
使用命令和 Job 也基本保持一致,这里就不过多赘述。

docs/job.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,11 @@ spec:
9292
containers:
9393
- name: echo
9494
image: busybox
95-
command: [for i in 9 8 7 6 5 4 3 2 1 ; do echo $i ; done]
95+
command:
96+
- "/bin/sh"
97+
args:
98+
- "-c"
99+
- "for i in 9 8 7 6 5 4 3 2 1 ; do echo $i ; done"
96100
```
97101

98102
使用命令和 Job 也基本保持一致,这里就不过多赘述。

0 commit comments

Comments
 (0)