We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent edc45f6 commit fbdb394Copy full SHA for fbdb394
Kubernetes/Kubernetes Demo Files/8.Jobs.txt
@@ -49,4 +49,25 @@ kubectl get po
49
50
51
*************************************************************************************************************************************************
52
+**************Cron Job***********************
53
+#cronjob.yaml
54
+apiVersion: batch/v1beta1
55
+kind: CronJob
56
+metadata:
57
+ name: cronjob
58
+spec:
59
+ schedule: "* * * * *"
60
+ successfulJobsHistoryLimit: 2
61
+ failedJobsHistoryLimit: 1
62
+ suspend: true
63
+ jobTemplate:
64
+ spec:
65
+ template:
66
67
+ containers:
68
+ - name: busybox
69
+ image: busybox
70
+ command: ["echo", "Hello world"]
71
+ restartPolicy: Never
72
73
+kubectl create -f cronjob.yaml
0 commit comments