I'm using AWS EKS with Auto Scaler for the worker nodes. I've private Artifactory docker registry.
Now in order to download docker images from private registry, I've read many documents including kubernetes docs for - how to pull docker image from private docker registry.
There are three steps in the solution:
kubectl secret
which contains docker registry credentials"insecure-registries":["privateRegistryAddress:port"]
in /etc/docker/daemon.json
I've manually SSH into worker nodes and ran 2nd and 3rd step which works for temporary but as EKS Auto Scaler finds if that worker nodes is not in use then kill it and create new one as needed, where in this new worker node "insecure-registries":["privateRegistryAddress:port"]
in /etc/docker/daemon.json
is not added, and due to which pod scheduling fails.
There are two solutions I can think of here -
"insecure-registries":["privateRegistryAddress:port"]
in /etc/docker/daemon.json
default and use that image in auto scaler configurationPlease advise. Thanks.
Solved this from first approach I mentioned in question.
kubectl secret
to login to private registry["privateRegistryAddress:port"]
in /etc/docker/daemon.json
and voila!! :)
Now whenever EKS using Auto Scaling group increase/decrease EC2 instances, they will be able to download docker images from private docker registry.