<p>Adding the annotation:</p>

<pre><code>  annotations:
    nginx.ingress.kubernetes.io/auth-url: http://my-auth-service.my-api.svc.cluster.local:8080
</code></pre>

<p>...to my ingress rule causes a 500 response from the ingress controller (the ingress works without it).</p>

<p>The service exists and I can ssh into the ingress controller and CURL it, getting a response:</p>

<p><code>curl http://my-auth-service.my-api.svc.cluster.local:8080</code> Produces a 200 response.</p>

<p>I checked the ingress controller logs but it says that the service returned a <code>404</code>. If I can CURL to the same URL why would it return a <code>404</code>?</p>

<pre><code>2019/07/01 20:26:11 [error] 558#558: *443367 auth request unexpected status: 404 while sending to client, client: 192.168.65.3, server: localhost, request: "GET /mocks HTTP/1.1", host: "localhost"
</code></pre>

<p>I'm not sure what to check to deterine the problem.</p>

<p>FWIW, for future readers - I ran into the same problem, and after looking at my auth service logs, noticed nginx ingress' requests were appending a /_external-auth-xxxxxx path to the request url.</p>

<p>Here's where the ingress controller does it, in the source:</p>

<p><a href="https://github.com/kubernetes/ingress-nginx/blob/master/internal/ingress/controller/template/template.go#L428" rel="nofollow noreferrer">https://github.com/kubernetes/ingress-nginx/blob/master/internal/ingress/controller/template/template.go#L428</a></p>

<p>And how <a href="https://github.com/oliverbarnes/liquid-voting-auth/commit/9bf59d890f0bc27c7957768417ece1cf8e53501b" rel="nofollow noreferrer">I'm handling it</a> in my own auth service (a Elixir/Phoenix route):</p>

<pre><code>get "/_external-auth*encoded_nginx_auth_url", TokenController, :index
</code></pre>
