This message was deleted.
# k3d
a
This message was deleted.
q
The
--no-lb
and disabling Traefik are to accommodate a pre-existing Traefik + MetalLB configuration, but perhaps it may be more appropriate to use Klipper at least?
I can drop the IP address to access the cluster under
localhost
no issue, mapping an
/etc/hosts
entry to
localhost
seems to fail because the port forward isn't actually listening for that host.
Ah, for future readers: this is because containers don't inherit
/etc/hosts
entries and need to be specified with
--host-alias
. And because
--host-alias
only understands IPs, it means you must have an
/etc/hosts
entry like
127.0.0.1 foobar.local
and then an additional
--host-alias 127.0.0.1 foobar.local
when running
k3d cluster create
w
The only error k3d states is that you didn't mention for which node you want to forward the ports. Since it's port 80, just go for
@loadbalancer
, appended to your -p value.
*just read it again and you disabled the lb, sorry.
Note though that --no-lb is not about Klipper but about k3d's cluster loadbalancer
q
Ah, well I ended up dropping MetalLB and doing the above and it seems to work as expected. Perhaps MetalLB and Klipper were interfering with each other on top of the host mapping issue.
No, what I said about host aliasing isn't quite right, or at least unrelated. It's specifically just that
/etc/hosts
entries that map to
localhost
will not function whereas mapping directly to
127.0.0.1
will.
w
Ah sorry, I never got back to this. Well,
/etc/hosts
must have one IP per line, which it "resolves" the names on the same line to.