<p>I want to define my service only with resource limits, so instead:</p>
<pre><code>resources:
  requests:
    memory: &quot;512Mi&quot;
    cpu: &quot;500m&quot;
  limits:
    memory: &quot;1024Mi&quot;
    cpu: &quot;1000m&quot;
</code></pre>
<p>I will use only:</p>
<pre><code>resources:
  limits:
    memory: &quot;1024Mi&quot;
    cpu: &quot;1000m&quot;
</code></pre>
<p>Will that be possible, or I must also define requests?</p>
<p>Thanks.</p>

jrz
<p>It is totally possible. A pod definition below will work as well:</p>
<pre><code>apiVersion: v1
kind: Pod
metadata:
  name: resource-limits
spec:
  containers:
  - name: resource-limits
    image: nginx
    resources:
      limits:
        memory: &quot;512Mi&quot;
        cpu: &quot;500m&quot;
</code></pre>
<p>If a Container specifies its own memory limit, but does not specify a memory request, Kubernetes automatically assigns a memory request that matches the limit. Similarly, if a Container specifies its own CPU limit, but does not specify a CPU request, Kubernetes automatically assigns a CPU request that matches the limit.</p>
<p>So if you do <code>kubectl describe po</code>, you see this:</p>
<pre><code>Containers:
  resource-limits:
    Container ID:   docker://a934c0e2d503a9ebc164aedf40ebecf3263f5bf5a03c196650a6e0d67d83c16c
    Image:          nginx
    Image ID:       docker-pullable://nginx@sha256:6b5f5eec0ac03442f3b186d552ce895dce2a54be6cb834358040404a242fd476
    Port:           &lt;none&gt;
    Host Port:      &lt;none&gt;
    State:          Running
      Started:      Sun, 11 Apr 2021 15:51:20 +0100
    Ready:          True
    Restart Count:  0
    Limits:
      cpu:     500m
      memory:  512Mi
    Requests:
      cpu:        500m
      memory:     512Mi
</code></pre>
