Created
July 18, 2018 13:41
-
-
Save kamiyaowl/3a12bf36b42373a55a96eeefc8cce51b to your computer and use it in GitHub Desktop.
Kubernetes cronjob
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/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