<p>I have mysql running in k8s with one replicaset, it keeps crashing at random times with exit code 137. Memory consumption is 82% while crashing.</p>

<p>I couldn't find anything in syslog, mysql error log and kubelet log other than restart message.</p>

<p>Instance is already having 64gb and once after the restart it is able to handle the application requests. So increasing memory should not be an actual solution.</p>

<p>Also monitoring tools says only 82% of the memory is being used at the time of crash. </p>

<ol>
<li>How kubernetes calculates the memory consumption of a pod?</li>
<li>How to find why it is crashing? </li>
</ol>

karthikeayan
<p>You can use <code>kubectl logs your-pod -c container-name -n your-namespaces</code> to see your log, use <code>kubectl describe pod your-pod -n your-namespaces</code> to see pod events. </p>
