This was suggested a while back in #182 and while I agree that port conflicts could be undesirable, the dramatic increase in complexity required to dynamically retrieve the ephemeral port and configure it in dependent applications is not worth it for local development IMO.
I would really like to see a --port or --publish flag added for this. Would a PR be accepted?
As an aside, the --enable-lb-port-mapping flag did not seem to work for me at first and I found it very difficult to debug because it seems like the port information returned about the kindccm envoy container is incorrect:
docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
4cebb83e06dc envoyproxy/envoy:v1.33.2 "/docker-entrypoint.…" 41 minutes ago Up 41 minutes 127.0.0.1:32784->80/tcp, 0.0.0.0:32785->10000/tcp, :::32785->10000/tcp kindccm-gw-4eff45ecc9be
4671e3a7b274 kindest/node:v1.35.0 "/usr/local/bin/entr…" 42 minutes ago Up 42 minutes 127.0.0.1:46517->6443/tcp control-plane
Based on 127.0.0.1:32784->80/tcp, I tried curl localhost:32784 from the host but this does not work.
However I eventually discovered that docker port reports different, seemingly more up to date information:
docker port kindccm-gw-4eff45ecc9be
80/tcp -> 0.0.0.0:65481
10000/tcp -> 0.0.0.0:32785
10000/tcp -> [::]:32785
And sure enough, curl localhost:65481 does work....
This was suggested a while back in #182 and while I agree that port conflicts could be undesirable, the dramatic increase in complexity required to dynamically retrieve the ephemeral port and configure it in dependent applications is not worth it for local development IMO.
I would really like to see a
--portor--publishflag added for this. Would a PR be accepted?As an aside, the
--enable-lb-port-mappingflag did not seem to work for me at first and I found it very difficult to debug because it seems like the port information returned about thekindccmenvoy container is incorrect:Based on
127.0.0.1:32784->80/tcp, I triedcurl localhost:32784from the host but this does not work.However I eventually discovered that
docker portreports different, seemingly more up to date information:And sure enough,
curl localhost:65481does work....