Kubernetes ingress-nginx preserve source IP Kubernetes ingress-nginx preserve source IP nginx nginx

Kubernetes ingress-nginx preserve source IP


I figured it out! The problem lies in the Iris web framework and has little to nothing to do with ingress-nginx.

The solution is to read the remote headers manually in ctx.Application().ConfigurationReadOnly().GetRemoteAddrHeaders(). By default the Iris framework does not check for X-Forwarded-For and X-Real-Ip

Hopefully this will be useful for those running reverse proxies to and from Kubernetes.