<p>Create a deployment as below:</p>

<pre><code>apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  labels:
    owt: hello
    pdl: com
    app: world
    idc: xg
    add: parameters-48
  name: parameters-48
spec:
  replicas: 2
  template:
    metadata:
      labels:
        name: parameters-48
    spec:
      containers:
      - name: mofang-web
        image: registry.cc.com/online/mofang:stable
      nodeSelector:
        node:cc
</code></pre>

<p>Login to node found the container's pid, then check its oom score:</p>

<pre><code>cat /proc/21606/oom_adj
-16
cat /proc/21606/oom_score
0
cat /proc/21606/oom_score_adj
-999
</code></pre>

<p>According user guide page: <a href="https://github.com/kubernetes/community/blob/master/contributors/design-proposals/resource-qos.md" rel="nofollow noreferrer">https://github.com/kubernetes/community/blob/master/contributors/design-proposals/resource-qos.md</a>, this pod should be a "Best-effort" pod, but its OOM_SCORE_ADJ not 1000 but -999.
By the way -999 means won't be oom killed.</p>

<p>Following the <a href="https://github.com/kubernetes/kubernetes/issues/40990" rel="nofollow noreferrer">issue</a>, it's maybe worth to summarize how to find the correct container pid / proc for a pod:</p>

<p>Run some application:</p>

<pre><code>$ kubectl run bootcamp --image=docker.io/jocatalin/kubernetes-bootcamp:v1
</code></pre>

<p>Find the containerID:</p>

<pre><code>$ kubectl get pods --output=jsonpath='{.items[*].status.containerStatuses[*].containerID}'
docker://59f127d641cef9475309cbf4b5fc2e4a65f3e52a0e08112dccbc2c144a0e366f
</code></pre>

<p>Find the related host / node:</p>

<pre><code>$ kubectl get pods --output=jsonpath='{.items[*].status.hostIP}'                          
192.168.99.100
</code></pre>

<p>Both could also be found with:</p>

<pre><code>$ kubectl describe pod &lt;podID&gt;
</code></pre>

<p>Connect to the node via SSH, then run:</p>

<pre><code>$ docker inspect 59f127d641cef9475309cbf4b5fc2e4a65f3e52a0e08112dccbc2c144a0e366f | grep Pid\":
"Pid": 18052,
$ cat /proc/18052/oom_*         
15
1000
1000
</code></pre>

<p>Hope this helps someone else at some point</p>
