An Image Pull Policy is a directive in a Kubernetes pod specification that dictates when the container runtime should download a container image from a registry. The three primary policies are Always, IfNotPresent, and Never. This setting is crucial for managing deployment speed, network efficiency, and ensuring pods run the intended image version, directly impacting agent deployment observability and rollout consistency.
Glossary
Image Pull Policy

What is Image Pull Policy?
A Kubernetes configuration that controls the container runtime's image caching and update behavior.
The IfNotPresent policy (the default if the image tag is :latest or unspecified) pulls the image only if it isn't already cached locally, optimizing for speed. The Always policy forces a pull on every pod creation, essential for guaranteeing the latest image in continuous deployment pipelines. The Never policy assumes the image is pre-loaded, used in air-gapped or highly controlled environments. Incorrect configuration can lead to stale image deployment or unnecessary registry load.
Core Image Pull Policy Values
The imagePullPolicy is a directive in a Kubernetes pod specification that controls the container runtime's behavior for fetching container images from a registry. It is a critical setting for managing deployment speed, network usage, and ensuring deterministic image versions in production.
Always
The Always policy instructs the kubelet to pull the image from the container registry every time a pod is started or restarted. This is the default policy when:
- Using the
:latesttag. - The image tag is omitted.
Key Use Cases:
- Development & CI/CD: Ensures the absolute latest build is always used.
- Security: Guarantees the node always fetches an image, which can be combined with registry authentication and vulnerability scanning on pull.
Considerations:
- Increases deployment latency due to network I/O.
- Can cause version indeterminism if the
:latesttag is mutable. - Consumes more network bandwidth.
IfNotPresent
The IfNotPresent policy tells the kubelet to pull the image only if it is not already present on the node. This is the default policy for all images with a specific tag other than :latest.
Key Use Cases:
- Production Stability: Favors speed and reduces external dependencies by using cached images.
- Air-Gapped/Offline Environments: Essential for clusters with limited or no external registry access.
- Bandwidth Conservation: Minimizes network traffic to the registry.
Considerations:
- Nodes may run stale images if the cache is not manually cleared.
- Requires a separate image update process (e.g., node recycling) for cluster-wide rollouts of a new image with the same tag.
Never
The Never policy instructs the kubelet to never pull an image. It will only start a container if the specified image is already present locally on the node.
Key Use Cases:
- Disconnected/High-Security Clusters: Where all container images are pre-loaded onto nodes via secure, offline processes.
- Testing with Custom Local Builds: Using images built directly on the node during development.
- Deterministic Binary Artifacts: Treating container images as immutable, pre-vetted binaries deployed via cluster management tooling.
Considerations:
- Pod scheduling is constrained to nodes that already have the image.
- Image updates require a deliberate, node-level orchestration process outside of standard Kubernetes deployments.
Interaction with Image Tags
The image tag directly influences the default pull policy, creating a crucial link between image versioning and deployment behavior.
Default Behavior Matrix:
- Image with tag
:latestor no tag: Defaults toAlways. - Image with any other tag (e.g.,
v1.2.3,sha256:abc123): Defaults toIfNotPresent.
Best Practices:
- Use Immutable Tags: Prefer cryptographically secure, immutable identifiers like SHA256 digests (e.g.,
myapp@sha256:abc123...). This combines the safety of a unique image with the speed ofIfNotPresent. - Avoid
:latestin Production: The mutable:latesttag can lead to unpredictable rollouts and makes rollbacks difficult. - Explicit Overrides: Always explicitly set the
imagePullPolicyin production manifests to avoid reliance on default behaviors.
Agent Deployment & Observability Impact
For Agent Deployment Observability, the pull policy is a key lever controlling rollout determinism and telemetry consistency.
Observability Implications:
- Rollout Speed:
IfNotPresentleads to faster pod startups on nodes with cached images, improving perceived agent availability. - Version Consistency: Using
Alwayswith mutable tags can cause a mixed-version deployment during a rollout, complicating performance benchmarking and anomaly detection. - Failure Diagnosis: Pods stuck in
ImagePullBackOffstatus indicate a failed pull due to policyAlwaysorIfNotPresentwith a missing image. This is a critical signal for deployment health.
Recommended Pattern for Agents:
- Build agent images with immutable tags (Git SHA).
- Set
imagePullPolicy: IfNotPresent. - Use a DaemonSet with a
RollingUpdatestrategy. - Force a pull of the new image by deleting pods or using a tool that updates the pod template, causing new pods to be created with the new image reference.
Related Kubernetes Concepts
The image pull policy interacts with several other core Kubernetes features for robust deployments.
Image Pull Secrets: The imagePullPolicy governs when to pull, while imagePullSecrets provide the credentials for pulling from private registries. Both must be correctly configured.
Node Selection & Affinity: The Never policy makes node image caching a critical scheduling constraint. You may need to use nodeName or nodeSelector to target pre-loaded nodes.
Pod Lifecycle: The pull attempt occurs during the container creation phase. Failures here are reflected in pod events and statuses (ErrImagePull, ImagePullBackOff).
Runtime Class: Advanced use cases may use different container runtimes (e.g., gVisor, Kata Containers) which all respect the standard imagePullPolicy.
Init Containers: Each init container can have its own imagePullPolicy, allowing flexible staging of prerequisite images.
How It Works: Mechanism and Interactions
An Image Pull Policy is a directive within a Kubernetes pod specification that controls the container runtime's behavior for fetching container images from a registry.
The policy is defined per container in a pod spec via the imagePullPolicy field. Its primary mechanism is to instruct the kubelet on the worker node when to initiate a pull operation against a configured container image registry. The three canonical values are Always, IfNotPresent, and Never. This setting directly interacts with the local container runtime's image cache, determining whether a remote registry check is required before container startup.
Its interaction with other systems is critical for deployment observability. During a rolling update, the policy governs whether a node uses a cached image or fetches the latest tagged version, affecting rollout consistency. It works in conjunction with image tags and digests; using the :latest tag with IfNotPresent can lead to stale deployments. For deterministic agent deployments, a policy of Always paired with immutable image digests ensures every pod restart pulls the exact, audited build.
Image Pull Policy Comparison
A comparison of the three primary Kubernetes image pull policies, detailing their behavior, use cases, and operational impact on container deployment.
| Policy Feature | Always | IfNotPresent | Never |
|---|---|---|---|
Default Pull Behavior | Pulls the image from the registry on every pod startup. | Pulls only if the image is not present on the node. | Never pulls an image; relies solely on a pre-pulled image on the node. |
Tag-Based Behavior | Always pulls, even for ':latest' or immutable tags. | Treats ':latest' tag as 'Always'; uses local cache for other tags. | Always uses local image, regardless of tag. |
Use Case | Guarantees the absolute latest image version; critical for CI/CD with mutable tags. | Optimizes for startup speed and reduces registry load; standard for production with versioned tags. | Air-gapped environments, local development, or when registry access is restricted. |
Network Dependency | High. Requires registry access on every pod (re)start. | Medium. Requires registry access only for the first pull per node. | None. No registry access required after initial image load. |
Startup Latency | Highest. Includes full image pull time on every restart. | Lowest after first pull. Subsequent starts use cached image. | Lowest. No pull overhead, but depends on pre-existing image. |
Security & Consistency | Ensures deployment of the latest, potentially patched, image from the registry. | Risk of node-level image drift if cached images are not updated. | Highest risk of drift; requires manual image management across the cluster. |
Registry Cost Impact | Highest. Generates pull requests on every pod lifecycle event. | Low. Pulls are amortized across multiple pods on a node. | None after initial cluster seeding. |
Recommended For | Development with mutable tags, canary deployments where image changes frequently. | General production deployments with immutable semantic version tags (e.g., 'app:v1.2.3'). | Highly controlled or offline environments with strict image governance. |
Frequently Asked Questions
A Kubernetes **Image Pull Policy** is a pod specification that dictates when the container runtime should pull a container image from a registry. It is a critical configuration for managing deployments, caching, and security in containerized environments.
An Image Pull Policy is a directive in a Kubernetes pod specification that controls the container runtime's behavior for fetching a container image. It determines whether the runtime should always pull the latest image, only pull if a cached version is not present, or never pull an image at all. This policy is defined per container within a pod using the imagePullPolicy field and is essential for managing image updates, ensuring consistency, and controlling network traffic to container registries.
The three primary policies are:
Always: The runtime pulls the image from the registry every time the pod starts.IfNotPresent: The runtime only pulls the image if it is not already present locally on the node.Never: The runtime will never pull the image and assumes it already exists locally.
This configuration is a foundational element of Agent Deployment Observability, as it directly impacts which version of an agent's code is executed, affecting rollout behavior and the validity of canary or A/B test results.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
Image Pull Policy is a core Kubernetes configuration for managing container images. The following concepts are essential for understanding its role in deployment stability and observability.
Container Image
A container image is a static, immutable file containing an application's code, runtime, system tools, libraries, and settings. It is the executable package used to instantiate a container. In Kubernetes, the spec.containers[].image field in a pod specification references this image, which the Image Pull Policy governs when to fetch.
- Key Layers: Base OS layer, dependency layers, application layer.
- Registries: Stored in repositories like Docker Hub, Google Container Registry (GCR), or Amazon ECR.
- Tags: Identifiers like
myapp:v1.2.3ormyapp:latest; the tag influences pull policy behavior.
Image Tag
An image tag is an alphanumeric identifier appended to a container image name, specifying a particular version or variant (e.g., nginx:1.23-alpine). It is critical for Image Pull Policy logic:
- Mutable Tags (e.g.,
:latest): The same tag can point to different image digests over time. A policy ofAlwaysis often used to ensure the latest digest is pulled. - Immutable Tags (e.g.,
:v1.2.3-abc123): The tag is permanently associated with a specific image digest. A policy ofIfNotPresentis safe and efficient. - Digest: The unique, immutable SHA256 hash of an image (e.g.,
nginx@sha256:abc123...). Referencing by digest bypasses tag semantics and is the most deterministic practice.
Image Registry
An image registry is a centralized service for storing, managing, and distributing container images. Kubernetes interacts with a registry to pull images based on the Image Pull Policy. Common registries include Docker Hub, Google Artifact Registry, and Azure Container Registry.
- Authentication: Pods often need
imagePullSecretsto authenticate with private registries. - Availability: Registry downtime can cause pod startup failures if the policy requires a pull.
- Mirrors & Caches: Organizations use local registry mirrors or caches (e.g., Harbor, Nexus) to improve pull performance, reduce external dependencies, and enforce security scanning. The pull policy interacts with these local endpoints.
Node Image Cache
The node image cache is a local store on each Kubernetes worker node where pulled container images are retained. The Image Pull Policy (IfNotPresent or Never) directly leverages this cache to avoid redundant network transfers.
- Cache Eviction: Nodes automatically garbage collect unused images based on disk pressure. This can cause subsequent pod startups to re-pull an image even with
IfNotPresent. - Performance: Using
IfNotPresentfor large, stable images significantly speeds up pod scheduling and scaling events. - Security Consideration: A cached image might contain vulnerabilities that are patched in a newer version in the registry. Policies like
Alwaysor periodic forced rollouts are used to ensure updates.
Image Pull Secret
An Image Pull Secret is a Kubernetes Secret of type kubernetes.io/dockerconfigjson that stores credentials for authenticating to a private container image registry. It is mounted into pods (via spec.imagePullSecrets) to allow the kubelet to pull images when the Image Pull Policy is invoked.
- Scope: Typically defined at the Pod or ServiceAccount level.
- Failure Mode: If a secret is missing or has invalid credentials, an image pull will fail, preventing pod startup.
- Best Practice: Use a dedicated service account with attached image pull secrets rather than defining them in individual pod specs.
Immutable Image Reference
An immutable image reference is a method of specifying a container image using its cryptographically secure digest (SHA256 hash) instead of a tag (e.g., nginx@sha256:abc123...). This practice guarantees the exact same binary artifact is deployed every time, making the Image Pull Policy largely irrelevant for version consistency.
- Determinism: Eliminates the risk of a mutable tag (
:latest) pointing to a different, potentially broken, image. - Policy Implication: With an immutable digest,
IfNotPresentis sufficient and optimal, as the content can never change. The pull will only occur if the image is not already cached on the node. - Deployment Integration: CI/CD pipelines must resolve the latest build's digest and update the deployment manifest, enabling full traceability from git commit to running container.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us