kubernetes-cron | cron system for Kubernetes | Cron Utils library
kandi X-RAY | kubernetes-cron Summary
kandi X-RAY | kubernetes-cron Summary
This container can be used to run periodic tasks in Kubernetes.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of kubernetes-cron
kubernetes-cron Key Features
kubernetes-cron Examples and Code Snippets
Community Discussions
Trending Discussions on kubernetes-cron
QUESTION
I found this Pass date command as parameter to kubernetes cronjob which is similar, but did not solve my problem.
I'm trying to backup etcd using a cronjob, but etcd image doesn't have "date" command.
...ANSWER
Answered 2020-Oct-27 at 11:54You can use printf like this:
QUESTION
I have a Kubernetes Cronjob that runs on GKE and runs Cucumber JVM tests. In case a Step fails due to assertion failure, some resource being unavailable, etc., Cucumber rightly throws an exception which leads the Cronjob job to fail and the Kubernetes pod's status changes to ERROR
. This leads to creation of a new pod that tries to run the same Cucumber tests again, which fails again and retries again.
I don't want any of these retries to happen. If a Cronjob job fails, I want it to remain in the failed status and not retry at all. Based on this, I have already tried setting backoffLimit: 0
in combination with restartPolicy: Never
in combination with concurrencyPolicy: Forbid
, but it still retries by creating new pods and running the tests again.
What am I missing? Here's my kube manifest for the Cronjob:
...ANSWER
Answered 2020-Apr-22 at 15:01To make things as simple as possible I tested it using this example from the official kubernetes documentation, applying to it minor modifications to illustrate what really happens in different scenarios.
I can confirm that when backoffLimit
is set to 0
and restartPolicy
to Never
everything works exactly as expected and there are no retries. Note that every single run of your Job
which in your example is scheduled to run at intervals of 60 seconds (schedule: "*/1 * * * *"
) IS NOT considerd a retry.
Let's take a closer look at the following example (base yaml
avialable here):
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install kubernetes-cron
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page