Created
April 27, 2023 04:38
-
-
Save czunker/ee29f077a0babcf6f2ce847c29823e8c to your computer and use it in GitHub Desktop.
Manifest with two CronJobs, one with namespace, the other one without namespace
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: batch/v1 | |
kind: CronJob | |
metadata: | |
name: hello | |
namespace: default | |
spec: | |
schedule: "* * * * *" | |
jobTemplate: | |
spec: | |
template: | |
spec: | |
containers: | |
- name: hello | |
image: busybox:1.28 | |
imagePullPolicy: IfNotPresent | |
command: | |
- /bin/sh | |
- -c | |
- date; echo Hello from the Kubernetes cluster | |
securityContext: | |
allowPrivilegeEscalation: true | |
restartPolicy: OnFailure | |
--- | |
apiVersion: batch/v1 | |
kind: CronJob | |
metadata: | |
name: hello-2 | |
spec: | |
schedule: "* * * * *" | |
jobTemplate: | |
spec: | |
template: | |
spec: | |
containers: | |
- name: hello | |
image: busybox:1.28 | |
imagePullPolicy: IfNotPresent | |
command: | |
- /bin/sh | |
- -c | |
- date; echo Hello from the Kubernetes cluster | |
securityContext: | |
allowPrivilegeEscalation: true | |
restartPolicy: OnFailure |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment