-
Notifications
You must be signed in to change notification settings - Fork 94
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
Comments
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:
I tried creating my own DNSEndpoint with the correct external IP as the target, but it didn't seem to get picked up. |
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. |
@neilmfrench, thanks a lot for the suggestions! That sounds reasonable and should be relatively straightforward to add. We will put it into the roadmap 👍 |
Hello, is there any update on fixing this issue ? |
Hi, we haven't implemented it yet. I will make sure we will discuss it on the next community meeting. Thanks for bringing it up |
Thank you for your prompt response, i'm looking forward this feature implemented !! |
Problem K8GB reads IP addresses from `Ingress.Status.LoadBalancer.Ingress` or from `Service.Status.LoadBalancer.Ingress` for ingress configured with Kubernetes Ingress and Istio Virtual Service, respectively. The IP addresses exposed by these resources are the IP addresses exposed by the Kubernetes Cluster. However, in some setups the clients do not route their traffic to these IP addresses because the cluster is behind a reverse proxy. Solution To support this setup, K8GB should expose DNS records with the IP address of the reverse proxy. Since the address is unknown to the cluster the K8GB administrator must provide it via configuration. This PR adds to K8GB the capability to read IP address from an annotation `k8gb.io/external-ips` on Ingress and Service resources. Examples ``` apiVersion: networking.k8s.io/v1 kind: Ingress metadata: labels: app: ingress annotations: k8gb.io/external-ips: "185.199.110.153" ``` ``` apiVersion: v1 kind: Service metadata: name: istio-ingressgateway namespace: istio-ingress labels: app: istio-ingressgateway annotations: k8gb.io/external-ips: "185.199.110.153,185.199.109.153" ``` Fixes k8gb-io#1275 Signed-off-by: Andre Baptista Aguas <[email protected]>
Problem K8GB reads IP addresses from `Ingress.Status.LoadBalancer.Ingress` or from `Service.Status.LoadBalancer.Ingress` for ingress configured with Kubernetes Ingress and Istio Virtual Service, respectively. The IP addresses exposed by these resources are the IP addresses exposed by the Kubernetes Cluster. However, in some setups the clients do not route their traffic to these IP addresses because the cluster is behind a reverse proxy. Solution To support this setup, K8GB should expose DNS records with the IP address of the reverse proxy. Since the address is unknown to the cluster the K8GB administrator must provide it via configuration. This PR adds to K8GB the capability to read IP address from an annotation `k8gb.io/external-ips` on Ingress and Service resources. Examples ``` apiVersion: networking.k8s.io/v1 kind: Ingress metadata: labels: app: ingress annotations: k8gb.io/external-ips: "185.199.110.153" ``` ``` apiVersion: v1 kind: Service metadata: name: istio-ingressgateway namespace: istio-ingress labels: app: istio-ingressgateway annotations: k8gb.io/external-ips: "185.199.110.153,185.199.109.153" ``` Fixes k8gb-io#1275 Signed-off-by: Andre Baptista Aguas <[email protected]>
Problem K8GB reads IP addresses from `Ingress.Status.LoadBalancer.Ingress` or from `Service.Status.LoadBalancer.Ingress` for ingress configured with Kubernetes Ingress and Istio Virtual Service, respectively. The IP addresses exposed by these resources are the IP addresses exposed by the Kubernetes Cluster. However, in some setups the clients do not route their traffic to these IP addresses because the cluster is behind a reverse proxy. Solution To support this setup, K8GB should expose DNS records with the IP address of the reverse proxy. Since the address is unknown to the cluster the K8GB administrator must provide it via configuration. This PR adds to K8GB the capability to read IP address from an annotation `k8gb.io/external-ips` on Ingress and Service resources. Examples ``` apiVersion: networking.k8s.io/v1 kind: Ingress metadata: labels: app: ingress annotations: k8gb.io/external-ips: "185.199.110.153" ``` ``` apiVersion: v1 kind: Service metadata: name: istio-ingressgateway namespace: istio-ingress labels: app: istio-ingressgateway annotations: k8gb.io/external-ips: "185.199.110.153,185.199.109.153" ``` Fixes k8gb-io#1275 Signed-off-by: Andre Baptista Aguas <[email protected]>
Problem K8GB reads IP addresses from `Ingress.Status.LoadBalancer.Ingress` or from `Service.Status.LoadBalancer.Ingress` for ingress configured with Kubernetes Ingress and Istio Virtual Service, respectively. The IP addresses exposed by these resources are the IP addresses exposed by the Kubernetes Cluster. However, in some setups the clients do not route their traffic to these IP addresses because the cluster is behind a reverse proxy. Solution To support this setup, K8GB should expose DNS records with the IP address of the reverse proxy. Since the address is unknown to the cluster the K8GB administrator must provide it via configuration. This PR adds to K8GB the capability to read IP address from an annotation `k8gb.io/external-ips` on the GSLB resource. Examples ``` apiVersion: k8gb.absa.oss/v1beta1 kind: Gslb metadata: labels: app: ingress annotations: k8gb.io/external-ips: "185.199.110.153" ``` Fixes k8gb-io#1275 Signed-off-by: Andre Baptista Aguas <[email protected]>
Problem K8GB reads IP addresses from `Ingress.Status.LoadBalancer.Ingress` or from `Service.Status.LoadBalancer.Ingress` for ingress configured with Kubernetes Ingress and Istio Virtual Service, respectively. The IP addresses exposed by these resources are the IP addresses exposed by the Kubernetes Cluster. However, in some setups the clients do not route their traffic to these IP addresses because the cluster is behind a reverse proxy. Solution To support this setup, K8GB should expose DNS records with the IP address of the reverse proxy. Since the address is unknown to the cluster the K8GB administrator must provide it via configuration. This PR adds to K8GB the capability to read IP address from an annotation `k8gb.io/external-ips` on the GSLB resource. Example ``` apiVersion: k8gb.absa.oss/v1beta1 kind: Gslb metadata: labels: app: ingress annotations: k8gb.io/external-ips: "185.199.110.153" ``` Fixes k8gb-io#1275 Signed-off-by: Andre Baptista Aguas <[email protected]>
Problem K8GB reads IP addresses from `Ingress.Status.LoadBalancer.Ingress` or from `Service.Status.LoadBalancer.Ingress` for ingress configured with Kubernetes Ingress and Istio Virtual Service, respectively. The IP addresses exposed by these resources are the IP addresses exposed by the Kubernetes Cluster. However, in some setups the clients do not route their traffic to these IP addresses because the cluster is behind a reverse proxy. Solution To support this setup, K8GB should expose DNS records with the IP address of the reverse proxy. Since the address is unknown to the cluster the K8GB administrator must provide it via configuration. This PR adds to K8GB the capability to read IP address from an annotation `k8gb.io/external-ips` on the GSLB resource. Example ``` apiVersion: k8gb.absa.oss/v1beta1 kind: Gslb metadata: labels: app: ingress annotations: k8gb.io/external-ips: "185.199.110.153" ``` Fixes k8gb-io#1275 Signed-off-by: Andre Baptista Aguas <[email protected]>
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!
The text was updated successfully, but these errors were encountered: