<p>I had a clean Azure subscription and created AKS using Standard SKU and very basic setup (2 D2as_v4 nodes, default settings). Installed NGINX like:</p>
<pre><code>helm install ingress-nginx ingress-nginx/ingress-nginx
</code></pre>
<p>Then put there a dummy app and made it accessible via Ingress + ClusterIP service:</p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: apps/v1
kind: Deployment
metadata:
  name: ingress-demo
spec:
  replicas: 1
  selector:
    matchLabels:
      app: ingress-demo
  template:
    metadata:
      labels:
        app: ingress-demo
    spec:
      containers:
      - name: ingress-demo
        image: mcr.microsoft.com/azuredocs/aks-helloworld:v1
        ports:
        - containerPort: 80
---
apiVersion: v1
kind: Service
metadata:
  name: ingress-demo
spec:
  type: ClusterIP
  ports:
  - port: 80
  selector:
    app: ingress-demo
</code></pre>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: development-ingress
spec:
  ingressClassName: nginx
  rules:
  - http:
      paths:
      - path: /
        pathType: Prefix
        backend:
          service:
            name: ingress-demo
            port: 
              number: 80
</code></pre>
<p>This <strong>works</strong> and I can access the dummy app on the Public IP assigned to my Ingress.</p>
<h2>Issue:</h2>
<p>I cannot access my app using any non-defalt path configuration. I get <code>Error: Request timed out</code>
for anything else than <code>/</code>. This Ingress change does not work for me:</p>
<pre><code>- path: /foo
</code></pre>
<p>Same issue using regex:</p>
<pre><code>annotations:
  nginx.ingress.kubernetes.io/rewrite-target: /$2
...
    - path: /dev(/|$)(.*)
</code></pre>
<h2>UPDATE</h2>
<p>I have tried multiple fixes suggested in the <a href="https://github.com/Azure/AKS/issues/2903" rel="nofollow noreferrer">GitHub issue mentioned by silent</a>.<br />
Using following option makes <code>/foo</code> path work:</p>
<pre><code>--set controller.service.annotations.&quot;service\.beta\.kubernetes\.io/azure-load-balancer-health-probe-request-path&quot;=/healthz
</code></pre>
<p>But it still doesn't work for regex. To make path like <code>/dev(/|$)(.*)</code> operable you need either change Azure Load Balancer probe <a href="https://github.com/Azure/AKS/issues/2903#issuecomment-1106784221" rel="nofollow noreferrer">from HTTP to TCP</a> (keeping the port) or to install NGINX controller with this flag:</p>
<pre><code>--set controller.service.externalTrafficPolicy=Local
</code></pre>

Mamut
<p>Not quite sure but it sounds like you ran into this issue: <a href="https://github.com/Azure/AKS/issues/2903" rel="nofollow noreferrer">https://github.com/Azure/AKS/issues/2903</a></p>
<p>The solution was posted in this post: <a href="https://github.com/Azure/AKS/issues/2903#issuecomment-1109758644" rel="nofollow noreferrer">https://github.com/Azure/AKS/issues/2903#issuecomment-1109758644</a></p>
