<p>I'm running a node application <a href="https://github.com/awslabs/amazon-kinesis-client-nodejs" rel="nofollow noreferrer">built on top of AWS's java KCL lib</a> on k8s.</p>
<p>Every 5 minutes or so the container crashe with &quot;CrashLoopBackOff&quot; and restarts - I can't figure out why.</p>
<p>The container logs show no errors and at some point the stream simply ends with:</p>
<pre><code>Stream closed EOF for sol/etl-sol-onchain-tx-parse-6b7d8f4c94-tf8tc (parse)
</code></pre>
<p>The pod events show no useful info either, looking like this:</p>
<pre><code>│     State:          Running                                                                               
│       Started:      Sun, 08 May 2022 10:06:36 -0400                                                       
│     Last State:     Terminated                                                                            
│       Reason:       Completed                                                                             
│       Exit Code:    0                                                                                     
│       Started:      Sun, 08 May 2022 09:58:42 -0400                                                       
│       Finished:     Sun, 08 May 2022 10:03:43 -0400                                                       
│     Ready:          True                                                                                  
│     Restart Count:  6
</code></pre>
<p>How is it possible that it says &quot;Completed&quot; with exit code 0? The container is a never ending process, it should never complete.</p>
<p>CPU/mem requests are used 25-50% at most.</p>
<p>What else might be causing this? The container is supposed to be using 4-7 threads (not sure if green) - maybe that's the issue? Running it on a M5. large (2 vCPUs, 8gb ram).</p>

ilmoi
<p>I don't think that what you say is accurate :</p>
<blockquote>
<p>The container is a never ending process, it should never complete.</p>
</blockquote>
<p>In my opinion this is not linked to kubernetes but to your application in the container. Try to execute your container directly one your host (within docker for example) and check the behavior.</p>
