<p>I am running a Python app on production but my pod is restarting frequently on production environment. While on a staging environment it's not happening.</p>

<p>So I thought it could be CPU &amp; Memory limit issue. I have updated that also.</p>

<p>Further debug I got <code>137</code> exit code.</p>

<p>For more debug I go inside Kubernetes node and check for container.</p>

<p>Command used: <code>docker inspect &lt; container id &gt;</code></p>

<p>Here is output:</p>

<pre><code> {
    "Id": "a0f18cd48fb4bba66ef128581992e919c4ddba5e13d8b6a535a9cff6e1494fa6",
    "Created": "2019-11-04T12:47:14.929891668Z",
    "Path": "/bin/sh",
    "Args": [
        "-c",
        "python3 run.py"
    ],
    "State": {
        "Status": "exited",
        "Running": false,
        "Paused": false,
        "Restarting": false,
        "OOMKilled": false,
        "Dead": false,
        "Pid": 0,
        "ExitCode": 137,
        "Error": "",
        "StartedAt": "2019-11-04T12:47:21.108670992Z",
        "FinishedAt": "2019-11-05T00:01:30.184225387Z"
  },
</code></pre>

<p>OOMKilled is false so I think that is not issue. </p>

<p>Using GKE master version: <code>1.13.10-gke.0</code> </p>

<p>Technically all the 137 means is your process was terminated as a result of a SIGKILL. Unfortunately this doesn't have enough info to know where it came from. Tools like auditd or Falco on top of that can help gather that data by recording those kinds of system calls, or at least get you closer. </p>
