Exposing kubernetes pods on local network

duckhead92

Cadet
Joined
Oct 17, 2023
Messages
3
OK, I have a TrueNAS SCALE running on 192.168.1.2, with a DNS name of nas. That is great and working well. I've installed several Kubernetes pods with web interfaces. What they are isn't that important, so we'll just call them A, B, and C.

A has a web interface on port 30200. B on 30201, and C on 30202.

So, I can access A by http://192.168.1.2:30200. And, that works just great. But, what I really want to do is to access it by http://A.nas . As of now, I have a CNAME defined for A.nas, and going to http://A.nas:30200 takes me where I want to go. So, 1/2 way there.

Now, I need some kind of proxy-server to rewrite A.nas to 192.168.1.2:30200. Great, there are lots of options for that. As a matter of fact, I saw there is a pod for nginx-proxy-manager. So, I installed that (and worked around some weird installer issue.) And configured a redirection host for A.nas to go to 192.168.1.2:30200 . But, at no point did it ask or tell me what I connect to so that I go through the proxy-manager. As a result, going to http://A.nas sends me to the main TrueNAS interface, and not the web interface for A.

Is there an approved way of doing this on a TrueNAS box? If so, what is it?
 

duckhead92

Cadet
Joined
Oct 17, 2023
Messages
3
OK, it sounds like I want is Traefik and not nginx-proxy-manager. The setup looks a lot more like what I'm expecting, so I guess this issue is resolved. Now to make Traefik work.
 

Upuv

Cadet
Joined
Mar 10, 2023
Messages
9
I ran into that exact same problems.

In the end I built a vm to run nginx and a few other tools. I now have cnames all pointing the the same nginx vm. Where I either reverse proxy or redirect to a host port combo. Not a perfect solution but since I couldn't get the other app/containers to work I went with this.

I also use the vm as a jump host to get to the container and app shells. So I can ssh rather than go through the web terminal interface.
 
Top