<p>We had a major outage when both our container registry and the entire K8S cluster lost power. When the cluster recovered faster than the container registry, my pod (part of a statefulset) is stuck in  <code>Error: ImagePullBackOff</code>.</p>
<p>Is there a config setting to retry downloading the image from the CR periodically or recover without manual intervention?</p>
<p>I looked at <code>imagePullPolicy</code> but that does not apply for a situation when the CR is unavailable.</p>

<p>The  <code>BackOff</code>  part in <code>ImagePullBackOff</code>  status means that Kubernetes is keep trying to pull the image from the registry, with an exponential back-off delay (10s, 20s, 40s, …). The delay between each attempt is increased until it reaches a compiled-in limit of 300 seconds (5 minutes) - more on it in <a href="https://kubernetes.io/docs/concepts/containers/images/#imagepullbackoff" rel="noreferrer">Kubernetes docs</a>.</p>
<p><code>backOffPeriod</code> parameter for the image pulls is a hard-coded constant in Kuberenets and unfortunately is not tunable now, as it can affect  the node performance - otherwise, it can be adjusted in the very <a href="https://github.com/kubernetes/kubernetes/blob/5f920426103085a28069a1ba3ec9b5301c19d075/pkg/kubelet/kubelet.go#L155" rel="noreferrer">code</a> for your custom kubelet binary.
There is still ongoing <a href="https://github.com/kubernetes/kubernetes/issues/57291" rel="noreferrer">issue</a> on making it adjustable.</p>
