Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reverse proxy support? #1275

Open
neilmfrench opened this issue Sep 18, 2023 · 4 comments
Open

Reverse proxy support? #1275

neilmfrench opened this issue Sep 18, 2023 · 4 comments

Comments

@neilmfrench
Copy link

Hi,
I'm prototyping this with our reverse proxy. However, I'm running into an issue where coredns (exposed) is returning the internal IP of reverse proxy entrypoint, whereas I'd like it to return an external IP so we can have our main DNS delegate to it. Is this currently possible?

Thanks for your help!

@ytsarev
Copy link
Member

ytsarev commented Sep 18, 2023

Hi @neilmfrench , can you elaborate more about the specifics of your setup? What kind of ingress controller do you use and how is it integrated with reverse proxy?

@neilmfrench
Copy link
Author

Hi @neilmfrench , can you elaborate more about the specifics of your setup? What kind of ingress controller do you use and how is it integrated with reverse proxy?

Sure, I am using Traefik (other cluster uses nginx, but testing on cluster with Traefik first). Life of a request flows like this

request -> Cloudflare proxy -> external IP (189.XX.XX.XX)-> internal load balancer for Traefik (172.16.XX.XX) -> cluster nodes (not exposed)

I need coredns to respond with the external IP rather than the internal load balancer IP it currently responds with:

Status:
  Healthy Records:
    .....................
      172.16.20.30

I tried creating my own DNSEndpoint with the correct external IP as the target, but it didn't seem to get picked up.

@neilmfrench
Copy link
Author

neilmfrench commented Nov 18, 2023

I think the simplest solution would be to allow the reading of the "real" external IP from an annotation on the ingress if it exists, rather than relying only on status.loadBalancer.ingress. Health checks would still use the internal IP, but for building out the local targets list it would use whatever IP the annotation has.

@ytsarev
Copy link
Member

ytsarev commented Nov 19, 2023

@neilmfrench, thanks a lot for the suggestions! That sounds reasonable and should be relatively straightforward to add. We will put it into the roadmap 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants