2 min read | by Jordi Prats
On Kubernetes we can configure using the Pod manifest under which conditions we want to query the container registry to pull images by using the imagePullPolicy setting. We can configure the it on several objects like Deployment, StatefulSet, Pod, Job... In fact, we can set it on any object that includes a Pod template
apiVersion: v1
kind: Pod
metadata:
name: test-pod
namespace: demo
spec:
containers:
- image: alpine
imagePullPolicy: IfNotPresent
(...)
We can set it to the following values:
There are a special cases when the imagePullPolicy is not defined:
Posted on 05/05/2021