I'm running a node application built on top of AWS's java KCL lib on k8s.
Every 5 minutes or so the container crashe with "CrashLoopBackOff" and restarts - I can't figure out why.
The container logs show no errors and at some point the stream simply ends with:
Stream closed EOF for sol/etl-sol-onchain-tx-parse-6b7d8f4c94-tf8tc (parse)
The pod events show no useful info either, looking like this:
│ 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
How is it possible that it says "Completed" with exit code 0? The container is a never ending process, it should never complete.
CPU/mem requests are used 25-50% at most.
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).
I don't think that what you say is accurate :
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.