title: Kubernetes uses dns for nginx proxy_pass but not rewrite
body: <p>Why does kubernetes (using minikube) use dns for nginx's <code>proxy_pass</code> but not rewrite?</p>
  <p>Kubernetes replaces <code>auth-proxy-service.default</code> with ip address</p>
  <pre><code>  location /widget-server/ {
      proxy_pass http://auth-proxy-service.default:5902/;
    }
  </code></pre>
  <p>kubernetes does not replace <code>auth-proxy-service.default</code> with ipaddress and the url in browser actually shows <code>http://auth-proxy-service.default:5902/foo</code></p>
  <pre><code>  location /form-builder-auth {
      rewrite ^(.*)$ http://auth-proxy-service.default:5902/foo redirect;
    }
  </code></pre>