first commit
This commit is contained in:
commit
ba848e218d
1001 changed files with 152333 additions and 0 deletions
25
CloudNative/Kubernetes/Base/CronJob.md
Normal file
25
CloudNative/Kubernetes/Base/CronJob.md
Normal file
|
@ -0,0 +1,25 @@
|
|||
```
|
||||
apiVersion: batch/v1beta1
|
||||
kind: CronJob
|
||||
|
||||
metadata:
|
||||
name: hello
|
||||
|
||||
spec:
|
||||
schedule: "*/1 * * * *" ## 每分钟执行一次
|
||||
jobTemplate:
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: hello
|
||||
image: busybox
|
||||
args:
|
||||
- /bin/sh
|
||||
- -c
|
||||
- date; echo hello
|
||||
restartPolicy: OnFailure
|
||||
startingDeadlineSeconds: 10 ## job最长启动时间
|
||||
concurrencyPolicy: Allow ## 是否允许并行运行
|
||||
successfulJobsHistoryLimit: 3 ## 允许留存历史job的个数
|
||||
```
|
Loading…
Add table
Add a link
Reference in a new issue