Questions tagged [kubernetes-cronjob]

301 questions
1
vote
1 answer

k8s CronJob jobId which survive restarts

I have a daily k8s cron job, I need to have unique id for every created job, which is same on job restart in case of job failure. Example: 2021-04-10, restarts:0, id = 1234 -> failed 2021-04-10, restarts:1, id = 1234 -> failed 2021-04-10,…
Tomas Bartalos
  • 1,256
  • 12
  • 29
1
vote
1 answer

Docker/K8 : OpenSSL SSL_connect: SSL_ERROR_SYSCALL

Running a k8 cronjob on an endpoint. Test works like a charm locally and even when I sleep infinity at the end of my entrypoint then curl inside the container. However once the cron kicks off I get some funky error: [ec2-user@ip-10-122-8-121…
kddiji
  • 205
  • 1
  • 3
  • 14
1
vote
1 answer

Kubernetes - Helm not upgrading cron job

I have deployed many things with Helm into my Kubernetes cluster. My values.yaml file contains a lot of fields. The only modification I want to perform is add an additional environment variable to my cron job. (This cron job creates a pod where a…
1
vote
1 answer

Set a start date and a end date to a kubernetes cronjob

I would like to create a kubernetes Cronjob that create jobs (according to its schedule) only if the current date is between a configurable start date and end date. I can't find a way to do this with the basic cronjob resource. Is there a way to do…
Tewfik
  • 176
  • 2
  • 15
1
vote
3 answers

Kubernetes cronjob that calls all pods in a service

i have a netcore webapi deployed on kubernetes. Every night at midnight i need to call an endpoint to do some operations on every pod, so i have deployed a cronjob that calls the api with curl and the method does the required operations. apiVersion:…
DeNasti
  • 75
  • 1
  • 10
1
vote
1 answer

Add Pod to a kubernetes Job created by a CronJob

I have a CronJob which is defined to forbid concurrency (concurrencyPolicy: Forbid). Now the Pod which is launched by the Job by the CronJob itself spawns a Pod (which is out of my control) which in turn also may or may not spawn a Pod. ··········>…
scravy
  • 11,904
  • 14
  • 72
  • 127
1
vote
1 answer

kubernetes vpa for CronJob

I need to run VPA for CronJob. I refer to this doc. I think i followed it properly but it doesn't work for me. using GKE, 1.17 VPA version is vpa-release-0.8 I created CronJob and VPA with this file. apiVersion: batch/v1beta1 kind:…
변상현
  • 13
  • 3
1
vote
1 answer

Predictable pod name in kubernetes cron job

I have a cron job on kubernetes that I trigger like so for testing purposes: kubectl create -f src/cronjob.yaml kubectl create job --from=cronjob/analysis analysis-test This creates a pod with the name analysis-test-. I was wondering…
Olshansky
  • 5,904
  • 8
  • 32
  • 47
1
vote
1 answer

How can I run a cronjob on multiple nodes sequentially in kubernetes?

I have two different types of worker nodes, ones that do data preparation and nodes that do machine learning. I want to run a Cronjob that runs one process on a preparation node, then (only when finished) a second process on an ML node. How can I do…
GDev
  • 428
  • 1
  • 5
  • 14
1
vote
1 answer

Get timestamp of the last successful cronjob completion via kubectl

I have a cronjob running every couple of minutes in kubernetes and would like to set up an alert that notifies me when the cronjob stops working. I'm expecting it to fail sometimes, it's calling two REST endpoints and they won't always be…
fafl
  • 7,222
  • 3
  • 27
  • 50
1
vote
2 answers

Kubernetes cron job oomkilled

I have a rails app that is deployed on K8S. Inside my web app, there is a cronjob thats running every day at 8pm and it takes 6 hours to finish. I noticed OOMkilled error occurs after a few hours from cronjob started. I also increased memory of a…
Tran B. V. Son
  • 759
  • 2
  • 12
  • 31
1
vote
1 answer

How to modify default expired time of continue token in Kubernetes?

On this page https://kubernetes.io/docs/reference/using-api/api-concepts/#retrieving-large-results-sets-in-chunks, there is a continue token that will expire after a short amount of time (by default 5 minutes). I find that when kubernetes controller…
1
vote
0 answers

Kubernetes v1.16.7 number of CronJob exceed 20k+ and do not execute

I'm using Kubernetes v1.16.7 Client Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.3", GitCommit:"b3cbbae08ec52a7fc73d334838e18d17e8512749", GitTreeState:"clean", BuildDate:"2019-11-13T11:23:11Z", GoVersion:"go1.12.12",…
yr12Dong
  • 21
  • 3
1
vote
1 answer

How do I connect to Docker, running on host VMs in a Kubernetes cluster from a container running in the same Kubernetes cluster?

I'm using a docker image that has docker installed inside it, in order to run tasks to cleanup docker image data on every node in my kubernetes cluster. I tried using Daemonset as it will run on each node except master, but running cron inside…
hisdudeness
  • 438
  • 1
  • 5
  • 15
1
vote
1 answer

Why does a kubernetes cronjob pauses

I have cronjob that is defined by this manifest: apiVersion: batch/v1beta1 kind: CronJob metadata: name: trigger spec: concurrencyPolicy: Forbid startingDeadlineSeconds: 5 schedule: "*/1 * * * *" jobTemplate: spec: …
Tomas Jansson
  • 22,767
  • 13
  • 83
  • 137