Interview Prep/Kubernetes/Services, DNS, Ingress and NetworkPolicy

A report endpoint returns `504 Gateway Time-out` from the Ingress after exactly 60 seconds.

IntermediateTroubleshootingServices, DNS, Ingress and NetworkPolicy
Answer

Likely causes → ingress-nginx proxy-read-timeout defaults to 60s; the backend takes longer. A cloud LB in front (ALB idle timeout 60s) gives the same symptom.

Diagnose →

kubectl logs -n ingress-nginx deploy/ingress-nginx-controller | grep 'upstream timed out'

Fix → Raise timeouts only for that route:

nginx.ingress.kubernetes.io/proxy-read-timeout: "300"
nginx.ingress.kubernetes.io/proxy-send-timeout: "300"

and the ALB idle timeout if present. Better: make long reports asynchronous (job + polling).

Prevent → Keep synchronous requests short and budget timeouts end to end: each inner hop should time out before the outer one (app < ingress < load balancer < client), so the caller gets a clean error instead of a cut connection.

All Kubernetes questions Roadmap: Kubernetes networking, storage & scaling

More on Services, DNS, Ingress and NetworkPolicy