How to read client IP addresses from HTTP requests behind Kubernetes services?

前端 未结 7 1142
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-03 01:03

my web application is running as a Kubernetes pod behind an nginx reverse proxy for SSL. Both the proxy and my application use Kubernetes services for load balancing (as des

7条回答
  •  甜味超标
    2020-12-03 01:52

    For kubernetes 1.7+ set service.spec.externalTrafficPolicy to Local will resolve it. More information here: Kubernetes Docs

提交回复
热议问题