0

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.

intechops6
  • 1,007
  • 4
  • 22
  • 43

1 Answers1

1

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
  • 4,939
  • 10
  • 19
  • Leszko - thanks for the answer. so, underlying docker decides which registry to use. I am looking for a command like "helm registry" to tell helm, rather than specifying in the configuration. is this possible? – intechops6 Nov 08 '19 at 16:14
  • No, since the Helm tool as nothing to do about the Docker registry. – Rafał Leszko Nov 12 '19 at 18:44