Skip to content

Commit

Permalink
fix:Normalize the command of the job yaml file and modify the job md.
Browse files Browse the repository at this point in the history
  • Loading branch information
ShyunnY committed Mar 29, 2023
1 parent 1bc56ef commit 524b19b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
6 changes: 5 additions & 1 deletion docs/job.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ spec:
containers:
- name: echo
image: busybox
command: [for i in 9 8 7 6 5 4 3 2 1 ; do echo $i ; done]
command:
- "/bin/sh"
args:
- "-c"
- "for i in 9 8 7 6 5 4 3 2 1 ; do echo $i ; done"
```
通过下面的命令创建 job,可以通过 `kubectl get pods -w` 来观察 job 创建 pod 的过程和结果。最后可以通过 `logs` 命令查看日志。
Expand Down
5 changes: 3 additions & 2 deletions job/hello-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ spec:
- name: echo
image: busybox
command:
- "bin/sh"
- "/bin/sh"
args:
- "-c"
- "for i in 1 2 3 4 5 6 7 8 9 ; do echo $i ; done"
- "for i in 9 8 7 6 5 4 3 2 1 ; do echo $i ; done"

0 comments on commit 524b19b

Please sign in to comment.