title: Why would kubernetes OOM kill a pause container?
body: <p>Occasionally our Kubernetes cluster (1.12.7 on GKE) emits an event like:</p>
  
  <pre><code>1 OOMKilling: Memory cgroup out of memory: Kill process 605624 (pause) score 0 or sacrifice child
  Killed process 605624 (pause) total-vm:1024kB, anon-rss:4kB, file-rss:0kB, shmem-rss:0kB
  </code></pre>
  
  <p>At exactly the same time we see an event from Docker:</p>
  
  <pre><code>datadog/agent@sha256:904c18135ec534fc81c29a42537725946b23ba19ac3c0a8b2e942fe39981af20 1 oom 1 kill 1 die 1 stop 1 destroy 1 create 1 start on gke-prod-pool-1-dc20d284-sjwm...
  
  OOM     k8s_datadog-agent_datadog-agent-76v8c_default_bf678779-c318-11e9-b064-42010a9a0059_7  
  KILL    k8s_datadog-agent_datadog-agent-76v8c_default_bf678779-c318-11e9-b064-42010a9a0059_7  
  ...
  </code></pre>
  
  <p>The <code>datadog-agent</code> pod is also restarted.</p>
  
  <p>This particular pod is configured with guaranteed QoS. According to the table under <a href="https://kubernetes.io/docs/tasks/administer-cluster/out-of-resource/" rel="nofollow noreferrer">Node OOM Behaviour on this page</a>, a guaranteed pod should have an oom score of -998.</p>
  
  <p>Why is the pause container being killed here? And since it appears to be  the pause container for the <code>datadog-agent</code> pod, why is the oom score 0, not -998? </p>