apiVersion: batch/v1 kind: CronJob metadata: name: weather-cronjob spec: schedule: "*/1 * * * *" jobTemplate: spec: template: metadata: labels: app: weather-job spec: containers: - name: weather-container image: curlimages/curl command: ["sh", "-c", "date >> /logs/wttr.log && curl 'wttr.in/peoria,il?format=3' >> /logs/wttr.log && echo ''"] volumeMounts: - name: logs-volume mountPath: /logs restartPolicy: OnFailure volumes: - name: logs-volume persistentVolumeClaim: claimName: data