<p>I have a spring boot application[java 11] hosted in AWS EKS Fargate with 2 replicas initially and HPA configured as well.</p>
<p>When I am doing load testing, both pods crash when the load increases and they will be restarted and then HPA kicks in and increase the pod count to 4.</p>
<p>I tried looking into the application logs and pod logs using --previous option as well But I couldn't understand the reason for the crash.</p>
<p>Could you help me with some pointers to trouble shoot this issue?</p>

ShefZee
<p>Kubernetes restarts a pod if a container uses more memory than the limit set for the container in the deployment file. Check your pod Memory metric if you are using Prometheus or any other cluster monitoring tool which gathers this data through metric server.</p>
<p>Check <a href="https://kubernetes.io/docs/tasks/configure-pod-container/assign-memory-resource/#exceed-a-container-s-memory-limit" rel="nofollow noreferrer">this</a> for more details.</p>
<p><code>If a Container allocates more memory than its limit, the Container becomes a candidate for termination. If the Container continues to consume memory beyond its limit, the Container is terminated. If a terminated Container can be restarted, the kubelet restarts it, as with any other type of runtime failure.</code></p>
