Use it when deciding how to reference images in deployments, or when two hosts run different content under the same tag.
Image Tags and Digests
Tags are mutable names for images (nginx:1.27, latest); digests (sha256:…) identify exact image content and never change.
1. What tag is deployed? pod spec / compose file.
2. Running digest: kubectl get pod <p> -o jsonpath='{.status.containerStatuses[*].imageID}'.
3. Same tag, different digest across nodes?
4. Pin image: repo@sha256:… (or immutable tags).
5. Redeploy.
tag → resolved to digest at pull → content
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 How to verify Verify boundary
Record the digest in deployment manifests or release notes. After a rollout, compare the Pod imageID with the expected digest. For multi-arch images, confirm the platform-specific manifest exists for every node architecture.
Step 2 Common failures Narrow the fault
Reusing a tag with imagePullPolicy IfNotPresent leaves old nodes running old content. An image built only for amd64 fails with exec format error on arm64 nodes. Deleting a tag in the registry does not delete the manifest still referenced by digest.
latest and moving tags lead to surprises — use immutable version tags plus digests in production. Kubernetes imagePullPolicy: IfNotPresent with a reused tag can keep old images on nodes.
docker ps -a— containers and exit codesdocker logs <c>— container outputdocker inspect <c>— config, mounts, network, state
ReferenceWhat it is1 section · depth on demand
How it works
Registries store manifests and blobs by digest. Pushing a tag updates a pointer to a manifest digest. A multi-arch tag points to an image index; the client picks the manifest that matches its platform. Kubernetes imagePullPolicy decides whether an existing local image for a tag is reused.
ReferenceImportant terms & boundaries3 sections · depth on demand
Tags vs digests in practice
docker pull nginx:1.27
docker image inspect nginx:1.27 --format '{{index .RepoDigests 0}}'
docker pull nginx@sha256:<digest>
Tags (latest, 1.27) can move to new images; digests are immutable. Deploy by digest (or immutable tags in the registry) so every node runs the same image, and use tools like Renovate to update pinned digests deliberately.
In depth
A tag is a movable name; a digest is the SHA-256 of the manifest and never changes. nginx:1.27 can point to different content tomorrow; nginx@sha256:… always means the same bytes.
What actually happens on pull
1. The client resolves the tag to a manifest (or image index) digest.
2. For an index, it selects the manifest for its platform (linux/amd64, linux/arm64 …).
3. It downloads only layer blobs it does not already have.
Worked check — what is running, by digest?
docker image inspect nginx:1.27 --format '{{index .RepoDigests 0}}'
# nginx@sha256:4c0f… (manifest-list digest)
kubectl get pod web-5d8f -o jsonpath='{.status.containerStatuses[0].imageID}'
# docker.io/library/nginx@sha256:4c0f…
If two Pods of the same Deployment report different imageID values, the tag moved between pulls.
Choosing a pinning strategy
| Strategy | Reproducible | Picks up security fixes |
|---|---|---|
:latest | No | Unpredictably |
:1.27 (minor tag) | No | Yes, on next pull |
:1.27.3 (patch tag) | Mostly; tags can be re-pushed | No |
@sha256:… | Yes | Only when you update the digest |
:1.27.3@sha256:… | Yes, and readable | Only when you update both |
Pin by digest in production manifests and let a bot (for example Renovate or Dependabot) raise updates, so changes are reviewed instead of arriving silently.
Common mistakes
- Deploying mutable tags instead of digests.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.