<p>I have an ingress with role with two paths:</p>
<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
metadata:
  name: myservice-production
  annotations:
    kubernetes.io/ingress.class: nginx
    nginx.ingress.kubernetes.io/rewrite-target: /
    nginx.ingress.kubernetes.io/ssl-redirect: &quot;true&quot;
    nginx.ingress.kubernetes.io/proxy-connect-timeout: &quot;30&quot;
    nginx.ingress.kubernetes.io/proxy-read-timeout: &quot;1800&quot;
    nginx.ingress.kubernetes.io/proxy-send-timeout: &quot;1800&quot;
    cert-manager.io/cluster-issuer: letsencrypt-prod
    acme.cert-manager.io/http01-edit-in-place: &quot;true&quot;
spec:
  rules:
    - host: ra2.myservice.com.br
      http:
        paths:
          - path: /
            backend:
              serviceName: myservice-production-deployment-nodeport
              servicePort: 80
          - path: /conteudo/
            backend:
              serviceName: seo-production-deployment-nodeport
              servicePort: 80
  tls:
    - hosts:
        - ra2.myservice.com.br
      secretName: ra-production-us2-certmanager-certificate

</code></pre>
<p>The SEO deployment is correct:</p>
<p>kind: Service
apiVersion: v1
metadata:
name: seo-production-deployment-nodeport
spec:
selector:
app: seo-production-deployment
ports:
- name: http
port: 80
targetPort: 3003
protocol: TCP
type: NodePort</p>
<p>But when I try to access any route from my conteudo path I'm getting a 302 redirect loop. It's just when using this ingress. If I change, for example, to:</p>
<pre><code>- host: ra2.myservice.com.br
  http:
    paths:
      - path: /
        backend:
          serviceName: seo-production-deployment-nodeport
          servicePort: 80
</code></pre>
<p>It starts working normally. I could not find a reasonable motive to be with this behavior.</p>

Jonathan Silva
<p>Remove this annotation :</p>
<pre class="lang-yaml prettyprint-override"><code>nginx.ingress.kubernetes.io/rewrite-target: /
</code></pre>
<p>Also the change the annotation :</p>
<pre class="lang-yaml prettyprint-override"><code>nginx.ingress.kubernetes.io/ssl-redirect: &quot;true&quot;
</code></pre>
<p>to this one:</p>
<pre><code>nginx.ingress.kubernetes.io/force-ssl-redirect: &quot;true&quot;
</code></pre>
<p>Edit the path - <code>path: /conteudo/</code> to - <code>path: /conteudo</code></p>
