Skip to content

Commit aa8eabc

Browse files
authored
Merge pull request kubernetes#40375 from candrews/patch-1
Clarify image pull policy regarding digests
2 parents c81142e + 28c9534 commit aa8eabc

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

content/en/docs/concepts/containers/images.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ You should avoid using the `:latest` tag when deploying containers in production
8888
it is harder to track which version of the image is running and more difficult to
8989
roll back properly.
9090

91-
Instead, specify a meaningful tag such as `v1.42.0`.
91+
Instead, specify a meaningful tag such as `v1.42.0` and/or a digest.
9292
{{< /note >}}
9393

9494
To make sure the Pod always uses the same version of a container image, you can specify
@@ -113,6 +113,8 @@ running the same code no matter what tag changes happen at the registry.
113113
When you (or a controller) submit a new Pod to the API server, your cluster sets the
114114
`imagePullPolicy` field when specific conditions are met:
115115

116+
- if you omit the `imagePullPolicy` field, and you specify the digest for the
117+
container image, the `imagePullPolicy` is automatically set to `IfNotPresent`.
116118
- if you omit the `imagePullPolicy` field, and the tag for the container image is
117119
`:latest`, `imagePullPolicy` is automatically set to `Always`;
118120
- if you omit the `imagePullPolicy` field, and you don't specify the tag for the
@@ -123,7 +125,7 @@ When you (or a controller) submit a new Pod to the API server, your cluster sets
123125

124126
{{< note >}}
125127
The value of `imagePullPolicy` of the container is always set when the object is
126-
first _created_, and is not updated if the image's tag later changes.
128+
first _created_, and is not updated if the image's tag or digest later changes.
127129

128130
For example, if you create a Deployment with an image whose tag is _not_
129131
`:latest`, and later update that Deployment's image to a `:latest` tag, the

0 commit comments

Comments
 (0)