Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Kubernetes Jobs not Completing

Follwing the documentation and provided example here: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/#running-an-example-job

I run kubectl apply -f job.yaml

kubectl apply -f job.yaml                                    
job.batch/pi created

Monitoring the job with get pods pi-fts6q 1/2 Running 0 52s

I always see 1/2 Running even after the job is complete and checking the logs shows it is completed.

How can I get the job to show a completed status? The job will stay in a running state showing no completions forever.

Parallelism:    1
Completions:    1
Start Time:     Thu, 06 Jun 2019 16:21:36 -0500
Pods Statuses:  1 Running / 0 Succeeded / 0 Failed

It seems the underlying pod that did the work completed, but the actual job-controller stays alive forever.

like image 457
Cromat Avatar asked Sep 03 '25 02:09

Cromat


1 Answers

Problem is in incomplete implementation of proxy-agent.

Simply add a '/quitquitquit' handler to proxy-agent.

Users can manually add a curl or http request to localhost to stop sidecar when the job is done. P0 is a workaround.

More information you can find here: istio-issue

like image 107
2 revsMaggieO Avatar answered Sep 05 '25 01:09

2 revsMaggieO