apiVersion: batch/v1beta1 kind: CronJob metadata: name: timestamp-cronjob spec: schedule: "*/1 * * * *" jobTemplate: spec: template: metadata: labels: app: timestamp-job spec: containers: - name: timestamp-container image: busybox command: ["sh", "-c", "date >> /logs/runs.log"] volumeMounts: - name: logs-volume mountPath: /logs subPath: logs restartPolicy: OnFailure volumes: - name: logs-volume persistentVolumeClaim: claimName: data subPath: logs