Get client ip from Google Network load balance


I can't use Google's HTTP load balance because it does not support web socket.

So my NGINX is running in Google Container Engine, behind Google Network Load Balance.

When the request arrives NGINX in docker container, it gets the IP of the NODE instead of the client ip.

2016/04/07 10:53:47 [error] 94#0: *73 access forbidden by rule,

How to solve this problem?

Best Answer

Getting the client IP when using Network Load balancer with Kubernetes is a known limitation. You can refer to this issue bug for updates and workarounds.