Kubernetes cluster version : 1.11
we are using Nginx as our ingress controller.
we have an ingress with host, my.domain.com, and it was working fine for years, but recently
if I try to access my.domain.com, randomly gives- "502 Bad Gateway (nginx/1.15.5)"
we tried some of the quick debug for the 502 issues.
- when the issue occurs we logged into nodes and did a curl request to the POD_IP:8080/index.html it worked
- also we don't have any ingress configured with the same host and path that might conflict
- there is no recent pod restarts or event in ingress controller pod.
also when the "502 Bad Gateway (nginx/1.15.5)" occured ingress-controller pod shows.
2021/06/30 08:59:50 [error] 1050#1050: *1352377 connect() failed (111: Connection refused) while connecting to upstream, client: CLIENT_IP_HERE , server: my.domain.com , request: "GET /index.html HTTP/2.0", upstream: "http://POD_IP:8080/index.html", host: "my.domain.com", referrer: "https://my.domain/index.html"
so, according to a link The 502 HTTP status code returned by Nginx means that Nginx was unable to contact your application at the time of the request. according to the statement above, there is an issue with the pod or the ingress-controller??
but most of the time my.domain.com is accessible and ISSUE LOOKS INTERMITTENT,
is any other place we need to check for logs....?or anyone experienced the same issue?
Thanks in advance.