<p>I have an AKS cluster, as well as a separate VM. AKS cluster and the VM are in the same VNET (as well as subnet).</p>
<p>I deployed a echo server with the following yaml, I'm able to directly curl the pod with vnet ip from the VM. But when trying that with load balancer, nothing returns. Really not sure what I'm missing. Any help is appreciated.</p>
<pre><code>apiVersion: v1
kind: Service
metadata:
  name: echo-server
  annotations:
    service.beta.kubernetes.io/azure-load-balancer-internal: &quot;true&quot;
spec:
  type: LoadBalancer
  ports:
  - port: 80
    protocol: TCP
    targetPort: 8080
  selector:
    app: echo-server

---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: echo-deployment
spec:
  replicas: 1
  selector:
    matchLabels:
      app: echo-server
  template:
    metadata:
      labels:
        app: echo-server
    spec:
      containers:
        - name: echo-server
          image: ealen/echo-server
          ports:
            - name: http
              containerPort: 8080
</code></pre>
<p>The following pictures demonstrate the situation
<a href="https://i.stack.imgur.com/b9KFj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/b9KFj.png" alt="enter image description here" /></a>
<a href="https://i.stack.imgur.com/oG4dF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/oG4dF.png" alt="enter image description here" /></a>
<a href="https://i.stack.imgur.com/kQEUM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kQEUM.png" alt="enter image description here" /></a></p>
<p>I'm expecting that when curl the vnet ip from load balancer, to receive the same response as I did directly curling the pod ip</p>

dexian
<p>Can you check your internal-loadbalancer health probe.</p>
<p>&quot;For Kubernetes 1.24+ the services of type LoadBalancer with appProtocol HTTP/HTTPS will switch to use HTTP/HTTPS as health probe protocol (while before v1.24.0 it uses TCP). And / will be used as the default health probe request path. If your service doesn’t respond 200 for /, please ensure you're setting the service annotation service.beta.kubernetes.io/port_{port}_health-probe_request-path or service.beta.kubernetes.io/azure-load-balancer-health-probe-request-path (applies to all ports) with the correct request path to avoid service breakage.&quot;
(ref: <a href="https://github.com/Azure/AKS/releases/tag/2022-09-11" rel="nofollow noreferrer">https://github.com/Azure/AKS/releases/tag/2022-09-11</a>)</p>
<p>If you are using nginx-ingress controller, try adding the same as mentioned in doc:
(<a href="https://learn.microsoft.com/en-us/azure/aks/ingress-basic?tabs=azure-cli#basic-configuration" rel="nofollow noreferrer">https://learn.microsoft.com/en-us/azure/aks/ingress-basic?tabs=azure-cli#basic-configuration</a>)</p>
<pre><code>helm upgrade ingress-nginx ingress-nginx/ingress-nginx \
  --reuse-values \
  --namespace &lt;NAMESPACE&gt; \
  --set controller.service.annotations.&quot;service\.beta\.kubernetes\.io/azure-load-balancer-health-probe-request-path&quot;=/healthz
</code></pre>
