Questions tagged [kubernetes-jobs]

139 questions
0
votes
1 answer

ttlSecondsAfterFinished and Kubernetes 1.20

So, I created sample job from the docs: apiVersion: batch/v1beta1 kind: Job metadata: name: pi-with-ttl namespace: ish spec: ttlSecondsAfterFinished: 100 template: spec: containers: - name: pi image: perl:5.34.0 …
ISH91
  • 41
  • 4
0
votes
1 answer

Can node affinity cause pod eviction?

I have a number of jobs running across multiple nodes within the cluster. Randomly, the pods begin terminating and a new pod is created by the job. Each pod has a node affinity assigned to it, using preferredDuringSchedulingIgnoredDuringExecution…
0
votes
2 answers

How do I debug Kubernetes pods terminating unexpectedly in a job?

I am running a Kubernetes job, where pods are terminating and being recreated multiple times, for some unknown reason. I am assuming that the pods are terminated as a result of some sort of eviction process, as the termination occurs across all pods…
0
votes
1 answer

Automatically restart Kubernetes Job after node shutdown

We are running a daily cronjob on GKE. This job is executed on spot nodes. The container respects the SIGTERM and gracefully shuts down. However, this is then marked as successful and not restarted. How can I ensure that this job is restarted on a…
Rhand
  • 901
  • 7
  • 20
0
votes
0 answers

Kubernetes pod status changes from Running to NotReady despite the pod logs displaying no errors and seemingly completing successfully

I created a k8 Job to use for schema migration in a rails app. Below is the Job yaml excluding the env vars: --- - name: Deploy Migration Worker k8s: state: present force: 'yes' definition: apiVersion: batch/v1 kind: Job …
0
votes
0 answers

How to attach Kubernetes Service with a running Pod

Here is my problem statement, I started a Kubernetes Service (Svc-1) which then starts Kubernetes Job (Job-1) and that job create a Pod (Pod-1). This service (Svc-1) actually receives job status like ACTIVE, READY, FAIL, SUCCESS of the job. Svc-1 ->…
0
votes
0 answers

Running Kubernetes Job using Kubernetes Pod Operator in Airflow

I have a code which we want to run in n number of Pods simulataneously. When I was running manually I used to launch Kubernetes Job by giving Parallelism and Completetions in the yaml File. apiVersion: batch/v1 kind: Job metadata: annotations: …
0
votes
0 answers

Identify index in Indexed K8s Job contributing to BackoffLimitExceeded Job failure

I have an indexed k8s job with thousands of indexes. When job fails due to BackoffLimitExceeded, it is hard to identify the exact index or set of indexes that caused the failure. Is there an easier way to identify the failing indexes from the Job…
Anirudh Jayakumar
  • 1,171
  • 3
  • 15
  • 37
0
votes
1 answer

telnet: Unable to connect to remote host: Connection refused - running from a kubernetes pod

My local kubernetes cluster is running by Rancher Desktop - % kubectl cluster-info Kubernetes control plane is running at https://127.0.0.1:6443 CoreDNS is running at…
devcodes
  • 1,038
  • 19
  • 38
0
votes
0 answers

How to implement isWatchClose() in Watch Options using Fabric8

I want my code to wait until the job is finished and then proceed further. I saw that I can use isWatchClose() method, but which object this method belongs to ? I couldn't get help regarding this. Here is the screenshot from the doc Please guide.
0
votes
1 answer

How to disable automountServiceAccountToken in Kubernetes job template?

We are using Azure AKS cluster and as per the Azure Advisor recommendations, we have to disable Automounting of api credentials from the Pods. but when we tried to enable this property in jobs template, the template is not accepting the value. How…
0
votes
0 answers

Is it possible to share process namespace between two containers that live in different pods?

Is it somehow possible to share the processes or even the whole namespace between two containers that live in different pods? The use case is, one pod is part of StatefulSet, and the other pod is part of Job. The job should execute some commands to…
Mohammed Noureldin
  • 14,913
  • 17
  • 70
  • 99
0
votes
0 answers

Kubernetes job to update the environment variables in pod

I want to update/inject existing/old environment variables in a pod. How can I do via kubernetes job This is my daemon set : apiVersion: apps/v1 kind: DaemonSet spec: revisionHistoryLimit: 10 selector: matchLabels: k8s-app: aws-node …
0
votes
1 answer

Error parsing yaml to json: did not find expected key - kubernetes

I am trying to create a k8s job with the below yaml, apiVersion: batch/v1 kind: Job metadata: name: mysql-with-ttl spec: ttlSecondsAfterFinished: 100 template: spec: containers: - name: mysql image: mysql env: …
Soundarya
  • 153
  • 1
  • 2
  • 12
0
votes
1 answer

Kubernetes client Job create

I am using kubernetes client (https://github.com/kubernetes-client/javascript) to create job and I have set up service account for the pod which is creating the job. However, I am getting this error when executing the job creation. body: { kind:…