Kubernetes Container Image Usage
Kubernetes Container Image Usage explains how images are deployed, managed, and run in Kubernetes to enable scalable and consistent application delivery.
Kubernetes Container Image Usage is the practical, authoring-facing set of considerations around how a container's image field is referenced, resolved from private sources, and versioned, complementing the node-level mechanics of how the runtime actually pulls and caches images with the manifest-side decisions an author makes about exactly what image reference to write and how to keep it correctly resolvable across the image's entire lifecycle.
Image Reference Formats
Registry, Repository, and Tag Components
A full image reference decomposes into a registry hostname (defaulting to a well-known public registry if omitted), a repository path, and a tag or digest — registry.example.com/team/app:1.4.2 — with each component independently meaningful: the registry determines where the pull request is sent, the repository identifies the specific image family, and the tag or digest identifies the specific content within that family.
Tag Versus Digest References
A tag reference is mutable — the same tag string can point to different underlying content over time as new versions are pushed — while a digest reference (@sha256:...) is immutable, pinning to one exact, content-addressed image regardless of what any tag might later be reassigned to; the choice between the two directly determines whether a manifest's image reference alone is sufficient to know exactly what will run.
Private Registry Authentication
imagePullSecrets on the Pod
When an image resides in a private registry requiring authentication, a Pod references the necessary credentials through spec.imagePullSecrets, a list of Secret names containing registry credentials in the docker-config-json format, which the kubelet passes to the runtime's ImageService when a pull is required.
ServiceAccount-Attached Pull Secrets
Rather than specifying imagePullSecrets on every individual Pod, credentials can instead be attached to a ServiceAccount, automatically applied to every Pod using that ServiceAccount without needing to repeat the imagePullSecrets field across every manifest referencing images from that registry.
Node-Level Credential Providers
For cloud-hosted registries closely integrated with the cluster's underlying infrastructure, node-level credential provider plugins can supply short-lived, automatically rotated registry credentials without requiring any Secret to be manually created or referenced in the manifest at all, shifting authentication entirely into node-level configuration.
Multi-Architecture Images
Manifest Lists as a Single Reference for Multiple Architectures
A single image reference can resolve to a manifest list (sometimes called a multi-arch manifest) containing platform-specific image variants for different CPU architectures; the container runtime automatically selects the variant matching the node's own architecture during pull, meaning the same manifest content works unmodified across a cluster mixing, for instance, x86 and ARM nodes.
Implications for Digest Pinning
Pinning to a digest still works correctly with manifest lists, since the digest can reference the top-level manifest list itself, with architecture selection still resolved automatically beneath that pinned reference — digest pinning and multi-architecture support are not mutually exclusive concerns.
Tagging Strategy Considerations
Immutable Tags Through CI Convention
Because Kubernetes itself does not enforce tag immutability, teams commonly rely on registry-side configuration or CI pipeline discipline to ensure a given tag, once pushed, is never overwritten, effectively achieving tag immutability by convention even when using tags rather than raw digests in manifests, for readability's sake.
Environment-Specific Tagging Patterns
Some pipelines tag images with an environment-agnostic version identifier and rely on separate manifest overlays (through Kustomize or Helm values) to select which specific tag or digest each environment's manifests reference, keeping the image build artifact itself identical across environments while allowing deployment timing to differ per environment through the manifest layer alone.
Image Reference Validation Failures
Common Rejection Causes
A manifest referencing a malformed image string, a nonexistent tag, or an inaccessible private registry does not fail at admission time, since the API server does not validate that an image reference actually resolves; these failures surface only later, at pull time, as ErrImagePull or ImagePullBackOff status on the affected container, making image reference correctness a runtime concern rather than one the API layer can catch upfront.