<p>I'm exposing an HTTPS service API gateway with Swagger UI hosted on Azure AKS Cluster with ingress-nginx controller <a href="https://kubernetes.github.io/ingress-nginx/" rel="nofollow noreferrer">https://kubernetes.github.io/ingress-nginx/</a></p>
<p>Exposing the path my-domain.com/swagger works fine but when I try to make API calls( POST, GET, ...) I get a 404 error.</p>
<p>My ingress configuration configuration is the following:</p>
<pre><code>apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: api-gateway-ingress
  annotations:
    nginx.ingress.kubernetes.io/from-to-www-redirect: &quot;true&quot;
    cert-manager.io/cluster-issuer: letsencrypt-prod #letsencrypt-staging
    nginx.ingress.kubernetes.io/ssl-redirect: 'true'
spec:
  tls:
    - hosts:
        - my-domain.com
      secretName: tp-api-gateway-wildcard # get it from certificate.yaml
  rules:
    - host: my-domain.com
      http:
        paths: 
          - path: /swagger
            pathType: Prefix
            backend:
              service:
                name: api-gateway
                port:
                  number: 80
  ingressClassName: nginx
</code></pre>
<p>Anyone has an idea how can I successfully make the API calls ?
Thank you</p>

Reda E.
<p>Managed to make API calls because I exposed only the subpath <code>/swagger</code> where I could access only <code>my-domain.com/swagger</code> and not other paths.</p>
<p>Changed configuration such as :</p>
<pre><code>...
rules:
    - host: my-domain.com
      http:
        paths: 
          - path: /
            pathType: Prefix
...
</code></pre>
