1、条件:服务(Service)--->nginx-ingress-lb ---> 外部流量策略:Local
2、编辑 configmap nginx-configuration:
kubectl edit cm nginx-configuration -n kube-system
apiVersion: v1
data:
....
forwarded-for-header: X-Forwarded-For
use-forwarded-headers: "true"
....
1、条件:服务(Service)--->nginx-ingress-lb ---> 外部流量策略:Local
2、编辑 configmap nginx-configuration:
apiVersion: v1
data:
....
forwarded-for-header: X-Forwarded-For
use-forwarded-headers: "true"
....
本文标题:kubernetes 透传客户端真实IP
本文链接:https://www.haomeiwen.com/subject/fgowfktx.html
网友评论