i am trying load balancing using nginx to services behind istio service mesh deployed on openshift.
my query is in nginx.conf which ip's i have to use in case of istio deployment? in non-istio deployment i used node ip of pod and nodeport of service.
upstream infra{
server XXX.XXX.XXX.XXX:8080;
}
map $proxy_add_x_forwarded_for $client_ip {"~(?<IP>([0-9]{1,3}\.){3}[0-9]{1,3}),.*" $IP;}
server {
listen 80;
server_name example.com;
access_log /var/log/nginx/nginx.testmegh.access.log main;
error_log /var/log/nginx/nginx.testmegh.error.log error;
location /fininfra {
proxy_pass http://infra:80;
proxy_http_version 1.1;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
}
}