From b237842659588dbe38b7b9eb95fa3178ec497cba Mon Sep 17 00:00:00 2001 From: fudali Date: Tue, 11 Jun 2019 09:34:16 +0800 Subject: [PATCH] add related note with pod deleted (#14709) * feat: add job application has some error and restartPolicy is not Nerver pod will be delete note * feat: optimize delete pods related suggestion * Update jobs-run-to-completion.md --- .../workloads/controllers/jobs-run-to-completion.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/content/en/docs/concepts/workloads/controllers/jobs-run-to-completion.md b/content/en/docs/concepts/workloads/controllers/jobs-run-to-completion.md index 80b158f5c4283..b63e7ab80f036 100644 --- a/content/en/docs/concepts/workloads/controllers/jobs-run-to-completion.md +++ b/content/en/docs/concepts/workloads/controllers/jobs-run-to-completion.md @@ -213,6 +213,12 @@ status check. {{< note >}} Issue [#54870](https://github.com/kubernetes/kubernetes/issues/54870) still exists for versions of Kubernetes prior to version 1.12 {{< /note >}} +{{< note >}} +If your job has `restartPolicy = "OnFailure"`, keep in mind that your container running the Job +will be terminated once the job backoff limit has been reached. This can make debugging the Job's executable more difficult. We suggest setting +`restartPolicy = "Never"` when debugging the Job or using a logging system to ensure output +from failed Jobs is not lost inadvertently. +{{< /note >}} ## Job Termination and Cleanup