Skip to content

Instantly share code, notes, and snippets.

@wuestkamp
Last active April 4, 2019 20:20
Show Gist options
  • Save wuestkamp/26f89d939001bcab4f4fc1d02b8fd982 to your computer and use it in GitHub Desktop.
Save wuestkamp/26f89d939001bcab4f4fc1d02b8fd982 to your computer and use it in GitHub Desktop.
CKAD challenge #3
apiVersion: batch/v1beta1
kind: CronJob
metadata:
creationTimestamp: null
labels:
run: cronjob1
name: cronjob1
spec:
concurrencyPolicy: Allow
jobTemplate:
metadata:
creationTimestamp: null
spec:
parallelism: 2
template:
metadata:
creationTimestamp: null
labels:
run: cronjob1
spec:
volumes:
- name: cron-vol
persistentVolumeClaim:
claimName: task-pv-claim
containers:
- args:
- bash
- -c
- hostname >> /tmp/vol/storage
image: bash
name: cronjob1
resources: {}
volumeMounts:
- name: cron-vol
mountPath: /tmp/vol
restartPolicy: Never
schedule: '*/1 * * * *'
successfulJobsHistoryLimit: 4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment