Can I use ingress for a TCP port 5432?
# 🌱|help-and-getting-started
b
Hey y'all! Wanted to check if what I'm aiming to do here is possible or if maybe I should try to go to a different solution (maybe using localPort) https://discord.com/channels/817392104711651328/1120389258683883692/1155927557963776131 What I want to achieve is not having to do a port-forward of my postgres instances when I'm developing locally but be able to reach them through Ingress. I think maybe the localPort would work as well as I could have an specific port for it, but then I would need multiple because I have mutliple postgres instances running. Thanks ❤️
q
Hey Shanky! 👋 Hmmm, I'm thinking what could be done is to expose these by
nodePort
then rewrite their linkUrl to
something.garden
. I did something similar for my Codespaces with Garden example https://github.com/garden-io/garden-in-codespaces/blob/main/modules.garden.yml
b
Will give it a try! Thanks
Sadly it didn't worked I'm researching into allowing ingress in NGINX to pass TCP ports; and in theory it can be enabled with something like https://github.com/kubernetes/ingress-nginx/blob/main/docs/user-guide/exposing-tcp-udp-services.md Just for more context, what I'm trying to achieve is that any database used for local-development can have a routable local DNS that can be used to connect to the DB's from any IDE in your local computer without doing port-forwarding
cc @quaint-dress-831
q
@bright-policeman-43626 thanks for giving it a try! Tagging @curved-intern-91221 to see if he has any good ideas as I believe he was a major force in our Local Mode feature 🙂
c
I'll take a look 🙂
b
Thanks a lot! Please letting me know
c
Sorry, I'm a bit confused. I haven't found anything related to the local mode config in the attached examples. Looks like the local mode feature is not relevant here. Local mode always overrides the port-forwards, because it replaces the actual k8s resource with a reverse proxy, which is used to connect your local app to the cluster. We have one issue about that: https://github.com/garden-io/garden/issues/4926 I think the question here is about the standard port-forwards that Garden does.
b
Hey @curved-intern-91221 ! Thanks for checking! This is not related to local mode, I’m trying to setup an ingress for each of my databases so they are routed by NGINX (the only deployment I do with this service is to a local k8s but I don’t need to run dev mode in order to kick in my ingress config for the other services
We can close this one, thankfully my team accepted another solution which is using kubefwd to connect to the DB's!
2 Views