I'm using argocd and helm charts to deploy multiple applications in a cluster. My cluster happens to be on bare metal, but I don't think that matters for this question. Also, sorry, this is probably a pretty basic question.
I ran into a problem yesterday where one of the remote image sources used by one of my helm charts was down. This brought me to a halt because I couldn't stand up one of the main services for my cluster without that image and I didn't have a local copy of it.
So, my question is, what would you consider to be best practice for storing images locally to avoid this kind of problem? Can I store charts and images locally once I've pulled them for the first time so that I don't have to always rely on third parties? Is there a way to set up a pass-through cache for helm charts and docker images?
If your scheduled pods were unable to start on a specific node with an Failed to pull image "your.docker.repo/image"
error, you should consider having these images already downloaded on the nodes.
Think of how you can docker pull
the images on your nodes. It may be a linux cronjob, kubernetes operator or any other solution that will ensure presence of docker image on the node even if you have connectivity issues.
As one of the options:
On each node add insecure registry by editing /etc/docker/daemon.json
and adding
{ "insecure-registries" : ["myregistrydomain.com:5000"] }
restart docker service on each node to apply changes
change your helm charts templates, set proper image path from local repo
You may also be interested in Kubernetes-Helm Charts pointing to a local docker image