// Module included in the following assemblies:
// * openshift_images/image-pull-policy

:_mod-docs-content-type: CONCEPT
[id="images-image-pull-policy-overview_{context}"]
= About the imagePullPolicy parameter

[role="_abstract"]
To control when {product-title} pulls container images from registries or uses locally cached copies when starting containers, you can configure the `imagePullPolicy` parameter. This policy helps you manage image updates and optimize pod startup performance.

The following table lists the possible values for the `imagePullPolicy` parameter:

.`imagePullPolicy` values
[width="50%",options="header"]
|===
|Value |Description

|`Always`
|Always pull the image.

|`IfNotPresent`
|Only pull the image if it does not already exist on the node.

|`Never`
|Never pull the image.
|===

The following example sets the `imagePullPolicy` parameter to `IfNotPresent` for the image tagged `v1.2.3`:

.Example `imagePullPolicy` configuration
[source,yaml]
----
apiVersion: apps/v1
kind: Deployment
# ...
spec:
  # ...
  template:
    spec:
      containers:
      - name: my-app-container
        image: registry.example.com/myapp:v1.2.3
        imagePullPolicy: IfNotPresent
        ports:
        - containerPort: 8080
----

--
where:

`spec.template.spec.containers.image`:: Specifies is the image to use. In this example, the image tag is explicitly set to `v1.2.3`.
`spec.template.spec.containers.imagePullPolicy`:: Specifies the policy to use. In this example, the policy is set to `IfNotPresent` because the image tag is not `latest`.
--