<p>I have started a pod with an angular app in it and it is healthy with no errors when I do kubectl describe pod.</p>
<p>However, when I curl to ingress route I get a 502 bad gateway.</p>
<p>I tried exec into angular pod and do a curl localhost:4200 and I get: Failed to connect to localhost port 4200: Connection refused.</p>
<p>Weirdly enough when i do kubectl logs podname I see nothing and I thought I always see something here, not sure.</p>
<p>Question now is, do I have overlooked something?</p>
<ul>
<li>How do I check if angular app is working inside the pod?</li>
<li>What is the location of the logfile you see normally when you npm start an app?</li>
</ul>
<p>I havent posted any yaml files, because I think the problem lies with the angular app itself (the curl localhost:4200 hinted me to that).</p>

furion2000
<p>This could be caused by a variety of things. Generally around the container networking/ports/services.</p>
<ol>
<li><p>Investigate your Dockerfile source code. Does it run a process to expose your application and on what port.</p>
</li>
<li><p>If you can exec inside a running container...Find the active process exposing and port of your application. <code>netstat</code> is a useful tool for this: <code>netstat -pant</code> will list processes and their ports.</p>
</li>
<li><p>Does the port number correspond to that defined in your deployment/service/ingress yaml</p>
</li>
<li><p>Does the service name defined in the ingress match an actual service. If possible you could look at the ingress logs to see more information about the 502. It would probably say if it can't find an upstream service name.</p>
</li>
<li><p>Describe your service associated with your application, does it list active endpoints.</p>
</li>
</ol>
<p>Hopefully that points you in right direction.</p>
