Hello Gav Sturm,
Even though Azure Load Balancer health probes report "Healthy" and NodePort traffic works internally inside AKS, external connectivity (curl to Load Balancer Public IP) times out because there is no frontend rule properly linking the Load Balancer public IP to the backend NodePorts. This typically happens when you use a service of type NodePort
without creating an AKS-managed LoadBalancer
type service.
Why?
Ans- In AKS with a standard SKU Azure Load Balancer, health probes only check TCP connectivity to backend NodePorts. They do not guarantee that the frontend rule is correctly mapping external traffic. When you expose nginx using a NodePort
service type, Azure does not automatically create a frontend listener rule for port 80/443 on the Load Balancer. Therefore, external packets hitting the Load Balancer public IP timeout, even though the backend NodePort service works fine internally. NSG rules alone are not enough. The Load Balancer needs frontend rules + probes bound correctly. This behavior is by design with NodePort services in AKS and they require manual Load Balancer configuration if you don't use Service type LoadBalancer
.
I was checking the same from my end by creating a cluster with standard load balancer and deploying nginx ingress controller with a Service of type NodePort
and exposed ports 32080 (HTTP) and 32443 (HTTPS) and I observed the same error as yours.
How to fix it?
Ans- Delete the NodePort service and recreate the nginx service as type: LoadBalancer
instead of NodePort
, which automatically configures Azure Load Balancer frontend rules, backend pools, and probes correctly.
apiVersion: v1
kind: Service
metadata:
name: ingress-nginx-controller
namespace: ingress-nginx
spec:
type: LoadBalancer
selector:
app: ingress-nginx
ports:
- name: http
port: 80
targetPort: 80
- name: https
port: 443
targetPort: 443
You won't need to manually configure frontend rules when using Service type LoadBalancer
as AKS automatically handles the Azure Load Balancer wiring for you.
After applying this, a new external IP will be assigned to the service. Load Balancer frontend rules and health probes will be created properly. External access on port 80 will start working immediately.
References Docs: