Preserve client source IP for Kubernetes ingress?

最后都变了- 提交于 2020-01-24 17:53:05

问题


I am using this Ingress it is similar to Nginx: https://cloud.ibm.com/docs/containers?topic=containers-ingress_annotation#general

When I do:

request -> LoadBalancer Service -> client source public IP returned
request -> Ingress -> LoadBalancer Service -> some private IP returned

I would like to preserve the client source public IP. In my Service I am setting ExternalTrafficPolicy: Local, and it works when hitting the LoadBalancer directly, but I do not know what setting I require when going through the Ingress.


回答1:


For preserving Ingress source IP, see these steps: https://cloud.ibm.com/docs/containers?topic=containers-ingress#preserve_source_ip

Essentially you do the same thing that you've described, except that you edit the existing alb service.



来源:https://stackoverflow.com/questions/56656103/preserve-client-source-ip-for-kubernetes-ingress

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!