Skip to content

fix: propagate registry_port to container and containerd#160

Open
Bisman-Singh wants to merge 1 commit intohelm:mainfrom
Bisman-Singh:fix/registry-port-propagation
Open

fix: propagate registry_port to container and containerd#160
Bisman-Singh wants to merge 1 commit intohelm:mainfrom
Bisman-Singh:fix/registry-port-propagation

Conversation

@Bisman-Singh
Copy link
Copy Markdown

When using a non-default registry_port (e.g. 5555), the registry container still listened on port 5000 internally. The Docker port mapping (5555:5000) only worked from the host but not from within the Kind network, so pods could not pull images using the configured port.

Root cause:

  • docker run -p ${registry_port}:5000 mapped the host port but the container always bound to 5000
  • hosts.toml had port 5000 hardcoded instead of using ${registry_port}

Fix:

  • Set REGISTRY_HTTP_ADDR=0.0.0.0:${registry_port} so the registry binds on the configured port
  • Map the same port on both sides: -p ${registry_port}:${registry_port}
  • Use ${registry_port} in hosts.toml instead of hardcoded 5000

Tested with:

  • Custom port 5555: pods successfully pull images from kind-registry:5555
  • Default port 5000: no regression, works as before

Fixes #143

Fixes helm#143

Signed-off-by: Bisman-Singh <bismanmadaan1@gmail.com>
@Bisman-Singh
Copy link
Copy Markdown
Author

@cpanato could you review this when you have a moment?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Setting up a local registry doesn't work when using a registry_port different than default 5000

1 participant