Kubernetes Jobs: How to manually end a job without killing current running pods?

421 Views Asked by At

I have a job which currently runs with "pararellism" spec set to 5. (5 running pods at each given moment) I want the job to stop spawning new pods after each fail, but let the current running pods end uninterrupted.

Tried to set pararellism to 1 in yaml and apply the changes, but it instantly moves the pod to termination phase.

Sadly I cannot upload the yml configuration.

1

There are 1 best solutions below

1
Siegfred V. On

You could try with --cascade=orphan flag to orphan these dependents using kubectl

kubectl delete jobs --cascade=orphan