<p>The container set resource limit：</p>

<pre><code>resources:
      limits:
        cpu: "1"
        memory: 1G
      requests:
        cpu: "1"
        memory: 1G
</code></pre>

<p>the cgroup memory limit:</p>

<pre><code>cat /sys/fs/cgroup/memory/kubepods.slice/kubepods-podaace5b66_c7d0_11e9_ba2a_dcf401d01e81.slice/memory.limit_in_bytes 
999997440
</code></pre>

<p>1GB= 1*1024*1024*1024=1,073,741,824B</p>

<p>k8s version:1.14.4</p>

<p>docker version:  docker-ce-18.09.6
OS: ubuntu 18.04</p>

wow qing
<p>Because you declared a <em>GibiByte</em> using the <code>G</code> scale: if you expect a <em>GigaByte</em>, you should use <code>Gi</code></p>

<pre><code># k get deployments.apps memory -o yaml|grep -i limits -C 1
        resources:
          limits:
            memory: 1Gi

$ cat /sys/fs/cgroup/memory/kubepods/burstable/pod15dff9ec-7815-48c0-bfce-453be77413ad/memory.limit_in_bytes 
1073741824
</code></pre>
