ImagePullPolicy

If you use :latest tags in your code while trying things, you may have noticed that the value of imagePullPolicy was set to Always:

imagePullPolicy: Always

This tells Kubernetes to always attempt to load new Docker images from container repositories. If you use a tag other than :latest, then the default (IfNotPresent) will only attempt to reload the container images if it can't find them in its local cache.

This is a technique that can be very useful while you are frequently updating your code. I recommend only using this when you are working by yourself, as sharing the knowledge of what exactly :latest means can be difficult and lead to a great deal of confusion.

It is generally considered a bad practice to use the :latest ...

Get Kubernetes for Developers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.