'Run Kubernetes pod on startup without internet connection

I have a Kubernetes node (K3S) running on an Intel NUC. I've deployed some Nginx images.

If I start the NUC without an Internet connection, I got the following errors:

May 16 13:40:36 ofb-nexcom-20220405 k3s[795]: E0516 13:40:36.954703     795 pod_workers.go:951] "Error syncing pod, skipping" err="failed to \"StartContainer\" for \"marketplace\" with CrashLoopBackOff: \"back-off 5m0s restarting failed container=marketplace pod=marketplace-d2mw9_marketplace(1b2e0113-0b30-4a34-ace8-54fe91b5dde9)\"" pod="marketplace/marketplace-d2mw9" podUID=1b2e0113-0b30-4a34-ace8-54fe91b5dde9
May 16 13:40:47 ofb-nexcom-20220405 k3s[795]: I0516 13:40:47.954289     795 scope.go:110] "RemoveContainer" containerID="c79e4d80eab650c89713ed08bdd515f8d6258cc38d9e825a4e5db68c6f4e24e1"

This seems legit and everything goes right when the Internet access is back. Moreover, the pods stay running if the connection goes away.

Is there a way to force pods to start even if the connection is away at startup.



Solution 1:[1]

Changing .spec.contianers[*].imagePullPolicy to IfNotPresent did the trick !

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Manitoba