From 9f758e644339807b363db1bc7d24c78815843bfa Mon Sep 17 00:00:00 2001 From: Qiming Date: Wed, 15 Nov 2017 02:48:53 +0800 Subject: [PATCH] Add warning about backoffLimit limitation (#6227) --- .../controllers/jobs-run-to-completion.md | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/docs/concepts/workloads/controllers/jobs-run-to-completion.md b/docs/concepts/workloads/controllers/jobs-run-to-completion.md index 9af3d12971..a0276e8b32 100644 --- a/docs/concepts/workloads/controllers/jobs-run-to-completion.md +++ b/docs/concepts/workloads/controllers/jobs-run-to-completion.md @@ -198,9 +198,20 @@ multiple pods running at once. Therefore, your pods must also be tolerant of co ### Pod Backoff failure policy -There are situations where you want to fail a Job after some amount of retries due to a logical error in configuration etc. -To do so set `.spec.backoffLimit` to specify the number of retries before considering a Job as failed. -The back-off limit is set by default to 6. Failed Pods associated with the Job are recreated by the Job controller with an exponential back-off delay (10s, 20s, 40s ...) capped at six minutes, The back-off limit is reset if no new failed Pods appear before the Job's next status check. +There are situations where you want to fail a Job after some amount of retries +due to a logical error in configuration etc. +To do so, set `.spec.backoffLimit` to specify the number of retries before +considering a Job as failed. The back-off limit is set by default to 6. Failed +Pods associated with the Job are recreated by the Job controller with an +exponential back-off delay (10s, 20s, 40s ...) capped at six minutes, The +back-off limit is reset if no new failed Pods appear before the Job's next +status check. + +**Note:** Due to a known issue [#54870](https://github.com/kubernetes/kubernetes/issues/54870), +when the `spec.template.spec.restartPolicy` field is set to "`OnFailure`", the +back-off limit may be ineffective. As a short-term workaround, set the restart +policy for the embedded template to "`Never`". +{: .note} ## Job Termination and Cleanup