<p>I have deployed a  node js  Application on K8  1.16 version.I notice that post deployment the backend pods keep crashing and going into CrashLoopBackOff, when I see the pod logs they dont give me much information :</p>
<pre><code>&gt; kubectl logs backend-mypod-backend-687bd47454-7dd6j

    copying .env from secret
    /opt/app-root/src/secret/.env.deploy found, copying to [/opt/app-root/src/.env]
    Start backend...
    
    &gt; backend@1.1.1 start /opt/app-root/src
    &gt; node lib/index.js
    
    &gt;
</code></pre>
<p>The node application within the pod tries to do an - npm start but then the pod just crashes. I want to figure out any logs which can help me tell why the application keeps crashing. But I dont not clearly know how or which log to look at.</p>
<p>Can any one pls help or suggest the best way to debug this.</p>
<p>UPDATE:</p>
<p>Also I realized that - End Points for the Backend Pods also show up as BLANK :</p>
<pre><code>kubectl describe svc
Name:              backend-XX-backend-svc
Namespace:         default
Labels:            &lt;none&gt;
Annotations:       &lt;none&gt;
Selector:          chart=backend-XX-backend,tier=backend
Type:              ClusterIP
IP:                192.168.246.12
Port:              &lt;unset&gt;  80/TCP
TargetPort:        8800/TCP
Endpoints:
Session Affinity:  None
Events:            &lt;none&gt;
</code></pre>
<p>Any more thoughts  as to why this may be the case.</p>

ptilloo
<p>You may want to review the official k8s documentation on <a href="https://kubernetes.io/docs/tasks/debug-application-cluster/debug-application/" rel="nofollow noreferrer">how to troubleshoot applications</a>.</p>
