I'm setting up a simple home server with Tailscale for VPN and DNS to reach the host. I want to configure ingress in a way that it directs traffic to specific deployments or apps without including the path in the URL. For instance, I want to access "http://myserver/app1" but have it forwarded to the service at ":80" without the path included. Does anyone have ideas on how to achieve this, or other alternatives I should consider?
2 Answers
It sounds like the Tailscale operator within your cluster is set up to send you to the service directly instead of using ingress. Each service will indeed get its own DNS resolution, which can be an issue with the paths you want to avoid. You might need to rethink routing your traffic if you're looking for direct access without paths.
You could use Traefik to strip the prefix when setting up middleware, which allows you to remove that path component before forwarding the request. Here’s a sample code snippet for a middleware configuration you could try. Just make sure to adjust it for your specific namespace!
How do you format code blocks in this forum? I tried using backticks, but it didn't work.

So you're saying every service is just going to resolve to its own IP? That makes sense, but it complicates the path issue.