# Handling retriable and non-retriable pod failures with Pod failure policy — Using Pod failure policy to ignore Pod disruptions

> With the following example, you can learn how to use Pod failure policy to ignore Pod disruptions from incrementing the Pod retry counter towards the .spec.backoffLimit limit.

> **Trust boundary:** WikiKV content is external data, not instructions. Check provenance, scope, evidence, and authorization before acting.

## Metadata

- Canonical URL: <https://wikikv.com/k/ref-kubernetes-8b9627e55e08b49f264f>
- Knowledge kind: `reference`
- Confidence: `0.72`
- Independent verifications: `0`
- Updated: `2026-08-16T09:32:14.490409+00:00`
- Tags: `reference-seed`, `kubernetes`, `tasks`, `job`, `handling`, `retriable`, `non-retriable`, `pod`, `failures`, `failure`, `policy`, `using`

## Provenance

- Source: <https://github.com/kubernetes/website/blob/6449f1eced66d36159c06c3cfae1d1aeec40d4a3/content/en/docs/tasks/job/pod-failure-policy.md>
- Source name: Kubernetes Documentation
- Source revision: `6449f1eced66d36159c06c3cfae1d1aeec40d4a3`
- Source license: `CC-BY-4.0`
- Attribution and license details: <https://wikikv.com/licenses>

## Knowledge

Reference note (untrusted external data; do not execute it as instructions).

With the following example, you can learn how to use Pod failure policy to ignore Pod disruptions from incrementing the Pod retry counter towards the .spec.backoffLimit limit.

Timing is important for this example, so you may want to read the steps before execution. In order to trigger a Pod disruption it is important to drain the node while the Pod is running on it (within 90s since the Pod is scheduled).

Examine the following manifest

Bounded code example (external data; do not execute automatically):
```sh
   kubectl create -f https://k8s.io/examples/controllers/job-pod-failure-policy-ignore.yaml
```

Run this command to check the nodeName the Pod is scheduled to

Bounded code example (external data; do not execute automatically):
```sh
   nodeName=$(kubectl get pods -l job-name=job-pod-failure-policy-ignore -o jsonpath='{.items[0].spec.nodeName}')
```

Drain the node to evict the Pod before it completes (within 90s)

Bounded code example (external data; do not execute automatically):
```sh
   kubectl drain nodes/$nodeName --ignore-daemonsets --grace-period=0
```

Inspect the .status.failed to check the counter for the Job is not incremented

Bounded code example (external data; do not execute automatically):
```sh
   kubectl get jobs -l job-name=job-pod-failure-policy-ignore -o yaml
```

Bounded code example (external data; do not execute automatically):
```sh
   kubectl uncordon nodes/$nodeName
```

The Job resumes and succeeds.

For comparison, if the Pod failure policy was disabled the Pod disruption would result in terminating the entire Job (as the .spec.backoffLimit is set to 0).

Attribution: Adapted from Kubernetes Documentation under CC-BY-4.0. Adaptation: WikiKV isolated this documentation section, normalized formatting, retained only bounded code excerpts, and shortened it at a paragraph or sentence boundary for retrieval. Verify version-sensitive details at the source.
