<p>I am trying to test mTLS but I am getting 302 when I curl the host defined in ingress resource.</p>
<pre><code>$ curl https://my.example.com --cert client.crt --key client.key -k
&lt;html&gt;
&lt;head&gt;&lt;title&gt;302 Found&lt;/title&gt;&lt;/head&gt;
&lt;body&gt;
&lt;center&gt;&lt;h1&gt;302 Found&lt;/h1&gt;&lt;/center&gt;
&lt;hr&gt;&lt;center&gt;nginx&lt;/center&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>
<p>Here's the ingress:</p>
<pre><code>kind: Ingress
metadata:
  annotations:
    nginx.ingress.kubernetes.io/auth-tls-secret: &quot;default/ca-secret&quot;
    nginx.ingress.kubernetes.io/auth-tls-verify-client: &quot;on&quot;
    nginx.ingress.kubernetes.io/auth-tls-verify-depth: &quot;1&quot;
    nginx.ingress.kubernetes.io/auth-tls-pass-certificate-to-upstream: &quot;true&quot;
  name: nginx-ingress
  namespace: default
spec:
  ingressClassName: nginx
  rules:
  - host: my.example.com
    http:
      paths:
      - path: /
        pathType: Prefix
        backend:
          service:
            name: nginx-svc
            port:
              number: 80
  tls:
  - hosts:
    - my.example.com
    secretName: tls-secret
</code></pre>
<p>Here's the ingress controller log:</p>
<pre><code>kubectl logs ingress-nginx-controller-79236f5c-gzgwl -n ingress-nginx -f
...
...
192.168.219.64 - - [15/Aug/2022:17:56:53 +0000] &quot;GET / HTTP/1.1&quot; 302 138 &quot;-&quot; &quot;curl/7.29.0&quot; 80 0.000 [] [] - - - - ae4b4fd210
</code></pre>
<p>I can curl the service nginx-svc successfully using the cluster-ip associated with the service. Any idea what's wrong with the ingress configuration?</p>

Technext
<p>Try:</p>
<p><code>curl https://my.example.com --cert client.crt --key client.key -k -v -o /dev/null</code></p>
<p>to see the headers -- you can then see what it is redirecting to. A possibility is that it's redirecting <code>https://my.example.com</code> to <code>https://my.example.com/</code></p>
