标签:pac 失败 lin hit fail white 一起 tar pre
一、job特性
apiVersion: batch/v1
kind: Job
medatada:
name: test-job
spec:
completions: 5 #需要运行的pod数量
parallelism: 2 #允许并发运行的pod数量
activeDeadlineSeconds: 360s #pod运行的超时时间
template:
medatada:
labels:
app: test-job
spec:
restartPolicy: OnFailure
containers:
- name: test-job
image: luksa/batch-job
三、cronjob定时计划任务
apiVersion: batch/v1beta1
kind: Cronjob
medatada:
name: test-cronjob
spec:
schedule: "30 * * * *" #参考定时计划任务(分时日月周)
startingDeadlineSeconds: 15 #pod必须在规定时间后的15秒内开始执行,若超过该时间未执行,则任务将不运行,且标记失败
jobtemplate:
spec:
template:
labels:
app: test-cronjob
spec:
restartPolicy: OnFailure
containers:
- name: test-job
image: luksa/batch-job
标签:pac 失败 lin hit fail white 一起 tar pre
原文地址:https://www.cnblogs.com/jayce9102/p/10616546.html