This will be a short post about a recent issue I encountered when using Nginx as a Kubernetes ingress. Though, this could also be encountered when using Nginx as a reverse proxy as well. The two definitions are functionally similar.
We recently had a client call in complaining of our application returning random 502s (Bad Gateway).
After some investigation and the common finger-pointing, I found this entry in the logs of our ingress controllers: