how to - helm install using private registry

11/5/2019

I am installing consul from repo using command "helm install --generate-name stable/consul --version 3.9.2 -n dev-namespace"

In my cluster there is no internet, how can I ask helm(helm v3) to use private registry to look for images instead of docker public registry since it is looking the default registry.

-- arunp
docker-registry
kubernetes-helm

1 Answer

11/6/2019

Helm itself is not responsible for fetching Docker images. Helm is just a "templating tool" for Kubernetes, so it's Kubernetes that is responsible for pulling Docker images.

Saying that, in Kubernetes (and in Docker in general), it's the image prefix that decides on where to look for the image. In your case you use stable/consul helm chart which uses consul Docker image. No prefix in the Docker image means it will be looked for in the official Docker image repository, Docker Hub.

Now, if you want to use your private repository, then you need to:

  • Tag consul image with <private-registry-url>/consul
  • Push <private-registry-url>/consul into your private repository
  • Use this image in the helm: helm install --generate-name --set Image=<private-registry-url>/consul stable/consul
-- RafaƂ Leszko
Source: StackOverflow