<p>I do not understand kubernetes <code>LimitRange</code> configuration.
I created a manifest with following contents:</p>

<pre><code>apiVersion: v1
kind: LimitRange
metadata:
  name: cpu-limit-range
spec:
  limits:
  - default:
      cpu: 4
    defaultRequest:
      cpu: 4
    max:
      cpu: 6

    type: Container
</code></pre>

<p>And then I run following commands :</p>

<pre><code>[root@localhost ~]# kubectl  delete  pods default-cpu-demo-19 1^C
[root@localhost ~]# kubectl  get pods  -n=limit
NAME                  READY   STATUS    RESTARTS   AGE
default-cpu-demo-19   0/1     Pending   0          9s
[root@localhost ~]# kubectl  describe pods   -n=limit
......(omitted unnecessary echo here)......
  Type     Reason            Age                 From               Message
  ----     ------            ----                ----               -------
  Warning  FailedScheduling  14s (x8 over 9m2s)  default-scheduler  0/1 nodes are available: 1 Insufficient cpu.
</code></pre>

<p>Of course, I know that  most amount of <em>limit:cpu</em> of a container can not be more bigger than that of above configuration. Otherwise, kubernets will report insufficient cpu.</p>

<p>And yet most amount of <em>max:cpu</em> of a container can not be bigger than that of above configuration as well.</p>

<p>I can't distinguish between maximum and limit, because a value is bigger than the limit or max is not allowed.</p>

<p>So, I want to know what they represent respectively and relation among them.</p>

zhangqichuan
<p>If i understand your question correctly, what you asked is -- what's the difference between min, max, default and defaultRequest limits for containers set in <code>LimitRange</code> resource. The answer is very simple:</p>

<ul>
<li>defaultRequest — is how much CPU/Memory will be given to Container, if it doesn't specify it's own value</li>
<li>default — is <strong>default limit</strong> for amount of CPU/Memory for Container, if it doesn't specify it's own value</li>
<li>max — is maximum limit for amount of CPU/Memory that Container can ask for. I.e. it <strong>can't set it's own limit more than that</strong></li>
<li>min — is minimum limit amount of CPU/Memory that Container can ask for. I.e. it <strong>can't set it's own limit less than that</strong></li>
</ul>

<p><a href="https://kubernetes.io/docs/tasks/administer-cluster/manage-resources/cpu-constraint-namespace/" rel="noreferrer">Here is</a> part of official documentation that has examples and more info on that topic.</p>
