I've an gce ingress controller pointing to a service type NodePort
.
Is there a way to preserve the client's ip? I've tried this from here, but it didn't work.
service.spec.externalTrafficPolicy = Local
I found some ways to do for nginx but none for an gce ingress.
The original ip comes in the X-Forwarded-For
header. If you're using rails it may come as HTTP_X_FORWARDED_FOR