背景
业务架构:client --> nginx --> ingress nginx controller --> svc --> pod
nginx中获取真实IP的配置
参考链接:https://developer.aliyun.com/article/70565
容器中获取真实IP的配置
修改容器ingress-nginx-controller的configmap
data下增加3行内容
compute-full-forwarded-for: "true"
forwarded-for-header: "X-Forwarded-For"
use-forwarded-headers: "true"