How to use dynamic IP in resolver directive when NGINX installed on Multi Nodes Openshift cluster

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

How to use dynamic IP in resolver directive when NGINX installed on Multi Nodes Openshift cluster

Marwan Bayadsi

Hi,

 

We’re from Amdocs and trying to install NGINX reverse proxy server on openshift cluster (6 nodes),  and as part of its configuration, we must specify the DNS IP to directive – ‘resolver’   (because proxy_pass has some parameters).

Nginx.conf:

                    Location ~ {

resolver DNS_IP valid=5s;

proxy_pass …..
}

But – since it’s OCP cluster (multiple machines), we don’t know which IP to give – as it depends on which node the nginx pod was started (in /etc/resolv.conf – it has the relevant node IP).    Also – we cannot put all IPs in parameters.

We ask for advice to:

1.      How we can force nginx to user /etc/resolv.conf  even if proxy_pass has parameters.   This will solve our issues.

2.      If #1 is not possible,  which display name we can put for resolver within open-shift cluster ?   for example – in K8S, we solved the issue by using kube-dns:

resolver kube-dns.kube-system.svc.cluster.local valid=5s;

 

               Which string is relevant for DNS inside open-shift cluster ?

 

Please assist.

 

 

Thanks,

Marwan

 

This message and the information contained herein is proprietary and confidential and subject to the Amdocs policy statement,

_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx
Reply | Threaded
Open this post in threaded view
|

Re: How to use dynamic IP in resolver directive when NGINX installed on Multi Nodes Openshift cluster

wld75
Hi Marwan,

Did you find solution for this one? Can you please share your
configurations?

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,281239,281789#msg-281789

_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx
Reply | Threaded
Open this post in threaded view
|

Re: How to use dynamic IP in resolver directive when NGINX installed on Multi Nodes Openshift cluster

wld75
In reply to this post by Marwan Bayadsi
Hi Marwan,

Did you find solution for this one? Can you please share your
configurations?

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,281239,281791#msg-281791

_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx