Questions tagged [kubernetes-jobs]
139 questions
3
votes
2 answers
Is it possible, and how to limit kubernetes job to create a maxium number of pods if always fail?
As a QA in our company I am daily user of kubernetes, and we use kubernetes job to create performance tests pods. One advantage of job, according to the docs, is
to create one Job object in order to reliably run one Pod to completion
But in our…

Lei Yang
- 3,970
- 6
- 38
- 59
3
votes
2 answers
What is a use case for kubernetes job?
I'm looking to fully understand the jobs in kubernetes.
I have successfully create and executed a job, but I do not see the use case.
Not being able to rerun a job or not being able to actively listen to it completion makes me think it is a bit…

Jxadro
- 1,497
- 2
- 16
- 36
2
votes
1 answer
Simplest way to retrieve a Job results?
I have a python program launching a batch job. The job outputs a json file, I'd like to know what is the easiest way to get this result back to the python program that launched it.
So far I thought of these solutions:
Upload the json file to S3…

E-Kami
- 2,529
- 5
- 30
- 50
2
votes
2 answers
Kubernetes limit number of retry
For some context, I'm creating an API in python that creates K8s Jobs with user input in ENV variables.
Sometimes, it happens that the Image selected does not exist or has been deleted. Secrets does not exists or Volume isn't created. So it makes…

BeGreen
- 765
- 1
- 13
- 39
2
votes
1 answer
helm hook for both Pod and Job for kubernetes not running all yamls
I am using Kubernetes with Helm 3.
It is ran on CentOS Linux 7 (Core).
K8S (check by running: kubectl version):
git version (kubernetes): v1.21.6, go version: go1.16.9.
helm version: v3.3.4
helm version (git) go1.14.9.
I need to create a Job that is…

Eitan
- 1,286
- 2
- 16
- 55
2
votes
1 answer
Update Kubernetes job with Helm
I have a helm chart containing Kubernetes job but unfortunately helm upgrade won't work because the image name is immutable so logically I need to do a delete and install but I will loose my set values.yaml if they were customised in the first…

user2137817
- 1,825
- 5
- 28
- 45
2
votes
1 answer
how to run a job in each node of kubernetes instead of daemonset
There is a kubernetes cluster with 100 nodes, I have to clean the specific images manually, I know the kubelet garbage collect may help, but it isn't applied in my case.
After browsing the internet , I found a solution - docker in docker, to solve…

Marco Mei
- 97
- 2
- 10
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
2 answers
How do I start a kubernetes job from an image in a local file system?
Seems like an obvious thing do. Very common in other similar systems. But I'm not seeing how to do it in kubernetes. What am I missing?

agapanthusblue
- 360
- 1
- 4
- 12
2
votes
1 answer
Do not delete Pods even if Job fails
I have to process tasks stored in a work queue and I am launching this kind of Job to do it:
apiVersion: batch/v1
kind: Job
metadata:
name: pi
spec:
template:
spec:
parallelism: 10
containers:
- name: pi
image:…

Fabrice Jammes
- 2,275
- 1
- 26
- 39
2
votes
2 answers
Java container that works as a Pod not working in a Job
I'm trying to use a container that contains a Java tool to do some DB migrations on a MySQL database in a Kubernetes Job.
When I run the container locally in Docker (using a MySQL container in the same network), the tool runs as expected.
And if I…

wtfc63
- 93
- 1
- 6
2
votes
1 answer
Getting Status code 422 when creating Kubernetes Job using nodejs
I am creating a Kubernetes Job within NodeJS class After importing the library @kubernetes/client-node, I created an object to use the module BatchV1Api inside the function which I am exporting to other class in which I have defined the body of the…

shivam
- 249
- 1
- 5
- 18
2
votes
1 answer
How the pod can reflect the application exit code of K8S Job
I'm running a K8S job, with the following flags:
apiVersion: batch/v1
kind: Job
metadata:
name: my-EP
spec:
template:
metadata:
labels:
app: EP
spec:
restartPolicy: "Never"
containers:
- name: EP
…

Mary1
- 320
- 4
- 13
2
votes
1 answer
gke job container restarted
In my project, GKE runs many jobs daily.
Sometimes I see that a job runs twice: the first time partially and the second time fully, although "restartPolicy: Never" is defined.
It happens very seldom (about one time per 200 - 300 runs).
This is an…

BT3
- 433
- 6
- 21
2
votes
1 answer
Trigger Kubernetes from from another kubernetes job
I am running on kubernetes job (job-1) from base pod. It works for basic use case. For second use case, I want trigger another kubernetes job(job-2) from already running job: job-1. While running job-2 I get service account error as given…

Akash Shinde
- 91
- 12