For imagePullPolicy: Always
, If the kubelet has a container image with that exact digest cached locally, the kubelet uses its cached image; otherwise, the kubelet pulls the image with the resolved digest, and uses that image to launch the container.
How long will these locally cached images exist? Since images are cached locally, I suspect that using a lot of different images for pods will cause problems with local disk usage.
And how to manage these locally cached images, such as configuring some caching policies to specify the lifetime of the cached images and how many images can be kept locally at most ?
CodePudding user response:
Kubelet have a Garbage collector for local images, you can read all the configuration you can change in the official docs