k8s 定时任务
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: crontab-job
spec:
schedule: "*/1 * * * *" #每一分钟执行一次
jobTemplate:
spec:
template:
spec:
containers:
- name: crontab-job
image: registry.aliyuncs.com/acs-sample/centos
args:
- id
restartPolicy: OnFailure