File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 也基本保持一致,这里就不过多赘述。
Original file line number Diff line number Diff line change 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 也基本保持一致,这里就不过多赘述。
You can’t perform that action at this time.
0 commit comments