0

Is there a method to configure Docker or Kubernetes to pull image into a created container without specifying the URL of the private registry in the HELM-charts which shall include only the image name and its tag ?!

In other words:

Instead of setting the image's URL in the value.yaml or Deployment.yaml files, instruct docker (or helm) to go pull the image directly from the private registry !

David Maze
  • 130,717
  • 29
  • 175
  • 215
McLan
  • 2,552
  • 9
  • 51
  • 85
  • I guess in theory you could do it with a mutating admission controller, but if Helm is involved, it's much clearer and fairly standard to include a `registry:` setting in the `values.yaml` file, and construct `image: {{ .Values.registry }}/{{ .Values.image }}:{{ .Values.tag }}`. – David Maze Jul 09 '21 at 15:29
  • @DavidMaze . This is what I am currently implementing. But I wondering how to direct docker or helm to skip docker hub and go to the private registry in a configuration file ! where is this config file and what do I have to change !! – McLan Jul 09 '21 at 15:36
  • For pure Docker, there is a setting to point at an alternate Docker Hub mirror, but in general it's discouraged; you don't want to accidentally run `malware.example.com/library/mysql` when you `docker run mysql`. There are more details in the linked question. – David Maze Jul 09 '21 at 16:34
  • @DavidMaze . Well, you got me convinced by the security point of pulling a malware. But I am testing it over a secure network (with no access to internet) and my HELM-Charts package doesn't have any dependencies to 3rd party images. Thank a lot though for pointing to the hub mirroring solution. Will check it out. – McLan Jul 09 '21 at 18:55

0 Answers0