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

Marwan Bayadsi marwan.bayadsi at
Mon Sep 17 12:18:28 UTC 2018


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).
                    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.


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

you may review at <>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list