https://rancher.com/ logo
#k3d
Title
# k3d
b

bumpy-laptop-27086

06/15/2022, 10:24 AM
Hi folks. My team is intending to adopt k3d for a local development environment, and we have to deploy infrastructure tools such as PostgreSQL, Kafka, Prometheus and so on. I’ve already been able to deploy all of them, but I’m struggling to enable access from the host machine (esp. kafka). I’m wondering if somebody here did it before and if so, could they point me towards the right path? Normally what I would do is to setup a load balancer, but this doesn’t work, I suspect is because of Docker for Mac. Thanks in advanced and have a nice day.
1
w

wide-garage-9465

06/15/2022, 10:29 AM
Hey 👋 Why does
LoadBalancer
service not work for you? Alternatively,
NodePort
could work or traefik's
IngressRouteTCP
if normal http ingress is not an option.
m

millions-alarm-86298

06/15/2022, 10:41 AM
I suggest to run more listeners in traefik and proxy kafka and pgsql via those listeners using TCP IngressRoute and also expose thos ports via docker not sure though if it is easy to manage those setting of embedded traefik in my case we dont deploy embedde traefik - instead we deploy it as a separate chart
b

bumpy-laptop-27086

06/15/2022, 10:43 AM
Hi folks, thanks for the quick answers. Those are PoV I definitely haven’t considered yet, I’ll test TCP ingress route, thanks 🙏
m

millions-alarm-86298

06/15/2022, 10:56 AM
And we use docker in wsl2 on windows, i think on mac it should be working as well
b

bumpy-laptop-27086

06/15/2022, 12:09 PM
I understand that k3d uses traefik already, do I have to do any additional stuff in order to get
IngressRouteTCP
working or is it compatible out of the box?
m

millions-alarm-86298

06/15/2022, 12:20 PM
Did you already try and experience the issues ? I am not using embedded traefik, so can't help, but it should work out of the box, since afaik the traefik is installed using their standard helm chart
b

bumpy-laptop-27086

06/16/2022, 9:30 AM
Hi folks, sorry for the late response. It took some tinkering with traefik (combination between lack of knowledge of the tool and not-so-great documentation), but I managed to get it working at the end. However, later I discovered I had some issues with my docker configuration and went back to exposing ports with the load balancer and it worked seamlessly. As this is easier to use for my teammates, I’ll stick with load balancers + exposing ports in docker with k3d for now. But thanks a lot for sharing the other potential solutions, was a great learning point for me 🙏
👍 1
9 Views