Currently I am using Nginx with Kubernetes. In my Nginx conf file I have the following proxy pass:
location ~ /myPath/([\w-]+)/resources {
rewrite ^/myPath/([\w-]+)/resources/(.*)$ /myNewPath/$1/resources/$2 break;
proxy_pass http://$1;
}
Currently Nginx complains that it is unable to resolve the $1 at runtime to perform the proxy_pass (despite us having our SkyDNS resolver specified i.e. resolver 10.250.0.5 valid=5s).
We need this to be done dynamically because at Nginx start up the value of $1 may not be known and must be resolved when requested.
Is Nginx capable of doing this dynamic DNS resolution on the fly?