k8s ingress获取真实IP地址配置

阿里云是在kube-system的配置项里有个nginx-configuration

里面增加

compute-full-forwarded-for: "true"
forwarded-for-header: "X-Forwarded-For"
use-forwarded-headers: "true"

如果缺少获取的ip一直都是cdn 的ip

发表评论