7-15 3 views
参见:https://v1-18.docs.kubernetes.io/zh/docs/tasks/job/automated-tasks-with-cron-jobs/
每5分钟执行一次startup.sh
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
apiVersion: batch/v1beta1 kind: CronJob metadata: name: fireye namespace: itnotebooks spec: schedule: "*/5 * * * *" jobTemplate: spec: template: spec: volumes: - name: pv-nas-itnotebooks-logs persistentVolumeClaim: claimName: pv-nas-itnotebooks-logs containers: - name: fireye image: registry-vpc.cn-hangzhou.aliyuncs.com/itnotebooks/fireye:af834e1-1626259813 imagePullPolicy: Always volumeMounts: - name: pv-nas-itnotebooks-logs mountPath: /var/apps/logs command: - /bin/sh - /var/apps/bin/startup.sh restartPolicy: OnFailure imagePullSecrets: - name: hub-itnotebooks-release |
如果想赏钱,可以用微信扫描下面的二维码,一来能刺激我写博客的欲望,二来好维护云主机的费用; 另外再次标注博客原地址 itnotebooks.com 感谢!