Questions tagged [kubernetes-cronjob]
301 questions
2
votes
0 answers
Why is a kubernetes job neither running, succeeded or failed?
I have a job showed as incomplete:
$ kubectl get job | grep "flight-supplier-cache-import"
flight-supplier-cache-import-27290160 1/1 35s 10d
flight-supplier-cache-import-27291600 1/1 34s …

wxh
- 619
- 7
- 20
2
votes
1 answer
patch kubernetes cronjob with kustomize
I am trying to patch a cronjob, but somehow it doesn't work as I would expect. I use the same folder structure for a deployment and that works.
This is the folder structure:
.
├── base
│ ├── kustomization.yaml
│ └── war.cron.yaml
└── overlays
…

The Fool
- 16,715
- 5
- 52
- 86
2
votes
1 answer
Kubernetes cluster running Cronjob triggering only one pod
I was trying to find a solution how to run a job handled by 2 pods in a cluster.
The job is ran by the cronjob scheduler, to run every (say) 15 mins. This job is to fetch records from the db table and process it. There is only READ permission…

Senthil
- 323
- 4
- 15
2
votes
2 answers
Can an OpenShift CronJob benefit from ImageStream?
I have my CronJob working fine without the use of an image stream.
The job runs every 15 minutes and always pulls a tagged image, e.g. my-cron:stable.
Since the image is always pulled and the schedule tells the cluster when to run my job, what do I…

pgpb.padilla
- 2,318
- 2
- 20
- 44
2
votes
2 answers
Prometheus query for last local peak value
What Prometheus query (PromQl) can be used to identify the last local peak value in the last X minutes in a graph?
A local peak is a point that is larger than its previous and next datapoint. (So the current time is definitely not a local…

erfan mehraban
- 483
- 3
- 5
- 13
2
votes
1 answer
Is it possible to trigger a kubernetes cronjob also upon deployment?
I have a simple cronjob that runs every 10 minutes:
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: myjob
spec:
schedule: "*/10 * * * *" #every 10 minutes
successfulJobsHistoryLimit: 1
failedJobsHistoryLimit: 1
jobTemplate:
…

ArielB
- 1,184
- 2
- 11
- 36
2
votes
1 answer
How to Migrate Spring Batch Cron Jobs To Spring Cloud Task
I used quartz api for existing cron jobs but how should I configure these cron jobs with spring cloud task. We can dynamically get the cron expression definitions for each job from the DB for schedule the job, but how I need to configure it with…
user14522699
2
votes
1 answer
Read schedule expression of Kubernetes CronJob from ConfigMap
I've more that 10 CronJobs configured in Kubernetes and all working properly as expected.
Now I am planning add 20 more CronJobs. All jobs getting data from external resources, processing it and generating some kind of reports.
I want to configure…

Jignesh Dhua
- 1,471
- 1
- 14
- 31
2
votes
1 answer
grpcurl call from Kubernetes cronjob
I have a grpc service running in Kubernetes. I need a Kubernetes cronjob to invoke this service using grpcurl command.
My Kubernetes cronjob yaml file looks as mentioned bellow.
When I run this cronjob in kubernetes, I receive "/bin/sh: grpcurl: not…

N-K
- 23
- 5
2
votes
1 answer
How to collect logs of every job of a Kubernetes CronJob for a period of time?
Assume I have a Kubernetes CronJob
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: cron-job-logging
spec:
schedule: "@hourly"
jobTemplate:
spec:
template:
spec:
containers:
- name:…

Kalle Richter
- 8,008
- 26
- 77
- 177
2
votes
1 answer
Unable to mount google filestore inside a GKE pod directly (without using PV)
I am trying to take backup of Google Filestore to a GCS bucket. I also want to rsync the contents of filestore in primary region to another filestore in secondary region.
For this, I have created a bash script which is working fine in compute engine…

srsn
- 175
- 11
2
votes
1 answer
K8 cronjob vs deployment spec for python app
I have a docker image with a few python functions that I would like to execute using a K8 cronjob.
I added the docker image to the cronjob spec so the functions would be executed on a schedule.
Would it be necessary or beneficial if I created a…

PBandJ
- 2,537
- 3
- 21
- 31
2
votes
1 answer
When does status.lastScheduleTime change?
I'm working on a Kubernetes CronJob that relies on knowing when the last successfull run happened in order to correctly notify users about new events since said run. That said, I need to know if I can rely on status.lastScheduleTime to be my "last…

Pedro Fracassi
- 3,342
- 2
- 16
- 33
2
votes
2 answers
Kubernetes Cron-Job Slack Notification
I have a cronjob which creates postgres backup job.. I would like to send notification to slack channels via webhook with cronjob status fail or success. How can I add a condition or specify the status of Job and sending to slack? I suppose that…

semural
- 3,583
- 8
- 37
- 67
2
votes
0 answers
Openshift CronJob visible on the Overview screen
Is it possible to make job/cronjob visible on the Overview screen in Openshift Container Platform - Aplication Console - Overview? Amongst other services and their pods?
Currently I can see job/cronjob PODs only on
Aplication Console - Applications…

Jan Kapciar
- 21
- 2