@@ -367,7 +367,10 @@ you must ensure all nodes in the cluster have the same pre-pulled images.
367
367
This can be used to preload certain images for speed or as an alternative to authenticating to a
368
368
private registry.
369
369
370
- All pods will have read access to any pre-pulled images.
370
+ {{< note >}}
371
+ {{< feature-state feature_gate_name="KubeletEnsureSecretPulledImages" >}}
372
+ Access to pre-pulled images may be authorized according to [ image pull credential verification] ( #ensureimagepullcredentialverification )
373
+ {{< /note >}}
371
374
372
375
### Specifying imagePullSecrets on a Pod
373
376
@@ -380,6 +383,43 @@ Kubernetes supports specifying container image registry keys on a Pod.
380
383
` imagePullSecrets ` must all be in the same namespace as the Pod. The referenced
381
384
Secrets must be of type ` kubernetes.io/dockercfg ` or ` kubernetes.io/dockerconfigjson ` .
382
385
386
+ #### Ensure Image Pull Credential Verification {#ensureimagepullcredentialverification}
387
+
388
+ {{< feature-state feature_gate_name="KubeletEnsureSecretPulledImages" >}}
389
+
390
+ If the ` KubeletEnsureSecretPulledImages ` feature gate is enabled, Kubernetes will validate
391
+ image credentials for every image that requires credentials to be pulled,
392
+ even if that image is already present on the node.
393
+ This validation ensures that images in a pod request which have not been successfully pulled
394
+ with the provided credentials must re-pull the images from the registry.
395
+ Additionally, image pulls that re-use the same credentials
396
+ which previously resulted in a successful image pull will not need to re-pull from the registry
397
+ and are instead validated locally without accessing the registry
398
+ (provided the image is available locally).
399
+ This is controlled by the` imagePullCredentialsVerificationPolicy ` field in the
400
+ [ Kubelet configuration] ( /docs/reference/config-api/kubelet-config.v1beta1#ImagePullCredentialsVerificationPolicy ) .
401
+
402
+ This configuration controls when image pull credentials must be verified if the
403
+ image is already present on the node:
404
+
405
+ * ` NeverVerify ` : Mimics the behavior of having this feature gate disabled.
406
+ If the image is present locally, image pull credentials are not verified.
407
+ * ` NeverVerifyPreloadedImages ` : Images pulled outside the kubelet are not verified,
408
+ but all other images will have their credentials verified. This is the default behavior.
409
+ * ` NeverVerifyAllowListedImages ` : Images pulled outside the kubelet and mentioned within the
410
+ ` preloadedImagesVerificationAllowlist ` specified in the kubelet config are not verified.
411
+ * ` AlwaysVerify ` : All images will have their credentials verified
412
+ before they can be used.
413
+
414
+ This verification applies to [ pre-pulled images] ( #pre-pulled-images ) ,
415
+ images pulled using node-wide secrets, and images pulled using pod-level secrets.
416
+
417
+ {{< note >}}
418
+ In the case of credential rotation, the credentials previously used to pull the image
419
+ will continue to verify without the need to access the registry. New or rotated credentials
420
+ will require the image to be re-pulled from the registry.
421
+ {{< /note >}}
422
+
383
423
#### Creating a Secret with a Docker config
384
424
385
425
You need to know the username, registry password and client email address for authenticating
0 commit comments