Advertisement
andrejsstepanovs

k8s cronjob

Dec 7th, 2020
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 0.69 KB | None | 0 0
  1. ---
  2. apiVersion: batch/v1beta1
  3. kind: CronJob
  4. metadata:
  5.   name: foobar
  6.   namespace: default
  7.   labels:
  8.     app: foobar
  9. spec:
  10.   schedule: "*/5 * * * *"
  11.   successfulJobsHistoryLimit: 1
  12.   failedJobsHistoryLimit: 2
  13.   suspend: false
  14.   concurrencyPolicy: Forbid
  15.   jobTemplate:
  16.     spec:
  17.       template:
  18.         spec:
  19.           imagePullSecrets:
  20.             - name: custom-registry
  21.           restartPolicy: Never
  22.           securityContext:
  23.             runAsUser: 33
  24.             fsGroup: 33
  25.           containers:
  26.             - name: foobar
  27.               image: myimage:master
  28.               imagePullPolicy: IfNotPresent
  29.               args:
  30.                - php
  31.                 - /app/run.php
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement