Each container in a Pod has a container image. Once you have created an image and pushed it to a registry, you can then refer to it in the Pod.

Image pull policy overview

When Azure Red Hat OpenShift creates containers, it uses the container’s imagePullPolicy to determine if the image should be pulled prior to starting the container. There are three possible values for imagePullPolicy:

Table 1. imagePullPolicy values
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.

If a container’s imagePullPolicy parameter is not specified, Azure Red Hat OpenShift sets it based on the image’s tag:

  1. If the tag is latest, Azure Red Hat OpenShift defaults imagePullPolicy to Always.

  2. Otherwise, Azure Red Hat OpenShift defaults imagePullPolicy to IfNotPresent.