---
source: https://iinventedlight.com/library/notes/kubernetes-image-pull-policy.md
title: "Kubernetes imagePullPolicy, digests and ImagePullBackOff"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_license: "CC-BY-4.0 (Kubernetes docs); CC-BY-4.0 (kubernetes/website (GitHub)); prose restates cited source lines in own words"
license_family: mixed-green
attribution: "Summary by iinventedlight (AI-assisted). Sources: Kubernetes docs, Images; kubernetes/website (GitHub), images.md (source page). CC-BY-4.0 (https://raw.githubusercontent.com/kubernetes/website/main/LICENSE). Copyright The Kubernetes Authors."
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-18
status: published
approved_by: "Cole Withington, 2026-11-20 13:14 PT: \"Publish the full batch and rewrite the 6 live notes\""
checked_on: 2026-11-18
as_of: 2026-11-18
confidence: medium
untested: "Not reproduced (2026-11-18). Official docs and source files were read; no test suite, server, or API call was run for this note."
category: coding-references
topic_area: "code-devops: kubernetes image pull policy"
tags: [kubernetes, images, imagepullpolicy, registries, imagepullsecrets]
client: Librarian
sources:
  - id: S1
    title: "Images"
    publisher: Kubernetes docs
    url: https://kubernetes.io/docs/concepts/containers/images/
    accessed: 2026-11-18
    license: "CC-BY-4.0"
  - id: S2
    title: "images.md (source page)"
    publisher: kubernetes/website (GitHub)
    url: https://github.com/kubernetes/website/blob/main/content/en/docs/concepts/containers/images.md
    accessed: 2026-11-18
    license: "CC-BY-4.0"
---
# Kubernetes imagePullPolicy, digests and ImagePullBackOff
**Answer:** When the kubelet pulls an image depends on two things: the container's `imagePullPolicy` and the image tag. Omit the field and it is automatically set to `Always` for a `:latest` tag or no tag, and to `IfNotPresent` otherwise.

## Example

```yaml
apiVersion: v1
kind: Pod
metadata:
  name: private-app
spec:
  containers:
  - name: app
    image: fictional.registry.example:10443/team/app:v1.42.0
    imagePullPolicy: IfNotPresent
  imagePullSecrets:
  - name: regcred
```

```shell
kubectl create secret docker-registry regcred \
  --docker-server=fictional.registry.example:10443 \
  --docker-username=me --docker-password='...'
```

## Pull policies

| Policy | Kubelet |
|---|---|
| `IfNotPresent` | the image is pulled only if it is not already present locally |
| `Always` | the runtime resolves the tag to a digest each launch and downloads only uncached layers |
| `Never` | the kubelet does not try fetching the image; startup fails if it is missing |

Caching makes `Always` efficient if the registry is reliably accessible.

## Names, tags and digests

- Without a registry hostname, Kubernetes assumes the Docker public registry: `busybox:1.32.0` means `docker.io/library/busybox:1.32.0`.
- Avoid `:latest` in production: it is harder to track which version is running and to roll back.
- A digest such as `image@sha256:...` uniquely identifies a specific version, so a change at the registry cannot give you a mix of old and new Pods.

## Private registries

- With `imagePullSecrets` on a Pod, access is limited to Pods that supply their own keys.
- Node-level registry credentials, configured by a cluster administrator, let all Pods read any configured private registry.
- A kubelet credential provider plugin can fetch credentials dynamically.

## ImagePullBackOff

`ImagePullBackOff` means a container could not start because Kubernetes could not pull its image, for example an invalid name or a missing `imagePullSecret`. Kubernetes keeps retrying with an increasing back-off delay, up to a limit of 300 seconds.

## See also

- [kubernetes-pods](https://iinventedlight.com/library/notes/kubernetes-pods/)
- [kubernetes-secrets](https://iinventedlight.com/library/notes/kubernetes-secrets/)

## Claims

- id: C1
  claim: Omitted policy with :latest becomes Always.
  source: S2
  evidence: "and the tag for the container image is `:latest`, `imagePullPolicy` is automatically set to `Always`."

- id: C2
  claim: IfNotPresent pulls only when the image is missing locally.
  source: S2
  evidence: "the image is pulled only if it is not already present locally."

- id: C3
  claim: Avoid the latest tag in production.
  source: S1
  evidence: "You should avoid using the :latest tag when deploying containers in production"

## Sources

- [S1] Images. Kubernetes docs. https://kubernetes.io/docs/concepts/containers/images/ . License: CC-BY-4.0. Accessed 2026-11-18.

- [S2] images.md (source page). kubernetes/website (GitHub). https://github.com/kubernetes/website/blob/main/content/en/docs/concepts/containers/images.md . License: CC-BY-4.0. Accessed 2026-11-18.

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: Kubernetes docs, Images; kubernetes/website (GitHub), images.md (source page). CC-BY-4.0 (https://raw.githubusercontent.com/kubernetes/website/main/LICENSE). Copyright The Kubernetes Authors. Text was condensed and changed from the originals.

---

Agents: [/agents.md](/agents.md) | [/.well-known/agent-library.json](/.well-known/agent-library.json).
