Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Kubernetes cronjob
apiVersion: "batch/v1beta1"
kind: CronJob
metadata:
name: "<workload-name>"
namespace: "default"
labels:
app: "app-label"
spec:
schedule: "0 */4 * * *"
startingDeadlineSeconds: 120
jobTemplate:
spec:
template:
spec:
containers:
- name: "container-name"
image: "path/to/container/image:tag"
env:
#- envs...
restartPolicy: OnFailure
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.