<p>When a pod is in crashLoopBackOff state (for example), are the <strong>requested</strong> resources (CPU and MEMORY) still allocated to this pod ?</p>
<p>If you have the answer, please explain how did you do to make sure that it is or not still allocated to the pod &lt;3</p>

Bguess
<p>I got the answer, here is the test:</p>
<p>However the number of nodes I got or the amount of resources they have, I will create a resourceQuota for the namespace where I will perform the test:</p>
<p><code>resourceQuota.yaml</code>:</p>
<pre><code>apiVersion: v1
kind: ResourceQuota
metadata:
name: test-so
spec:
hard:
    cpu: &quot;10m&quot;
    memory: 10Mi
    pods: &quot;10&quot;
</code></pre>
<p>Let's create a busybox deployment that will CrashLoopBackOff with the maximum resource in the ResourceQuota allocated to it:</p>
<p><code>deployment1.yaml</code>:</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
labels:
    app: test-so
name: test-so
spec:
replicas: 1
selector:
    matchLabels:
    app: test-so
template:
    metadata:
    labels:
        app: test-so
    spec:
    containers:
    - image: busybox
        name: busybox
        resources: 
        requests:
            cpu: 10m
            memory: 10Mi
</code></pre>
<p>As expected its in CrashLoopBackOff state, however its deployed:</p>
<pre><code>&gt; kubectl get pods -o wide:

NAME                           READY   STATUS             RESTARTS      AGE     IP           NODE                   NOMINATED NODE   READINESS GATES
pod/test-so-57f76ccb9b-2w5vk   0/1     CrashLoopBackOff   3 (63s ago)   2m23s   10.244.5.2   so-cluster-1-worker2   &lt;none&gt;           &lt;none&gt;
</code></pre>
<p>Let's now create a second deployment with the same amount of resources:</p>
<p><code>deployment2.yaml</code>:</p>
<pre><code>    apiVersion: apps/v1
    kind: Deployment
    metadata:
    labels:
        app: test-so2
    name: test-so2
    spec:
    replicas: 1
    selector:
        matchLabels:
        app: test-so2
    template:
        metadata:
        labels:
            app: test-so2
        spec:
        containers:
        - image: busybox
            name: busybox
            resources: 
            requests:
                cpu: 10m
                memory: 10Mi
</code></pre>
<p>No pods created and here is the status of the replicaset:</p>
<pre><code>❯ k describe rs test-so2-7dd9c65cbd
Name:           test-so2-7dd9c65cbd
Namespace:      so-tests
Selector:       app=test-so2,pod-template-hash=7dd9c65cbd
Labels:         app=test-so2
                pod-template-hash=7dd9c65cbd
Annotations:    deployment.kubernetes.io/desired-replicas: 1
                deployment.kubernetes.io/max-replicas: 2
                deployment.kubernetes.io/revision: 1
Controlled By:  Deployment/test-so2
Replicas:       0 current / 1 desired
Pods Status:    0 Running / 0 Waiting / 0 Succeeded / 0 Failed
Pod Template:
Labels:  app=test-so2
        pod-template-hash=7dd9c65cbd
Containers:
busybox:
    Image:      busybox
    Port:       &lt;none&gt;
    Host Port:  &lt;none&gt;
    Requests:
    cpu:        10m
    memory:     10Mi
    Environment:  &lt;none&gt;
    Mounts:       &lt;none&gt;
Volumes:        &lt;none&gt;
Conditions:
Type             Status  Reason
----             ------  ------
ReplicaFailure   True    FailedCreate
Events:
Type     Reason        Age                From                   Message
----     ------        ----               ----                   -------
Warning  FailedCreate  31s                replicaset-controller  Error creating: pods &quot;test-so2-7dd9c65cbd-7x8qm&quot; is forbidden: exceeded quota: test-so, requested: cpu=10m,memory=10Mi, used: cpu=10m,memory=10Mi, limited: cpu=10m,memory=10Mi
Warning  FailedCreate  31s                replicaset-controller  Error creating: pods &quot;test-so2-7dd9c65cbd-kv9m4&quot; is forbidden: exceeded quota: test-so, requested: cpu=10m,memory=10Mi, used: cpu=10m,memory=10Mi, limited: cpu=10m,memory=10Mi
Warning  FailedCreate  31s                replicaset-controller  Error creating: pods &quot;test-so2-7dd9c65cbd-7w7wz&quot; is forbidden: exceeded quota: test-so, requested: cpu=10m,memory=10Mi, used: cpu=10m,memory=10Mi, limited: cpu=10m,memory=10Mi
Warning  FailedCreate  31s                replicaset-controller  Error creating: pods &quot;test-so2-7dd9c65cbd-8gcnp&quot; is forbidden: exceeded quota: test-so, requested: cpu=10m,memory=10Mi, used: cpu=10m,memory=10Mi, limited: cpu=10m,memory=10Mi
Warning  FailedCreate  31s                replicaset-controller  Error creating: pods &quot;test-so2-7dd9c65cbd-vllqf&quot; is forbidden: exceeded quota: test-so, requested: cpu=10m,memory=10Mi, used: cpu=10m,memory=10Mi, limited: cpu=10m,memory=10Mi
Warning  FailedCreate  31s                replicaset-controller  Error creating: pods &quot;test-so2-7dd9c65cbd-2jhnb&quot; is forbidden: exceeded quota: test-so, requested: cpu=10m,memory=10Mi, used: cpu=10m,memory=10Mi, limited: cpu=10m,memory=10Mi
Warning  FailedCreate  31s                replicaset-controller  Error creating: pods &quot;test-so2-7dd9c65cbd-gjtvw&quot; is forbidden: exceeded quota: test-so, requested: cpu=10m,memory=10Mi, used: cpu=10m,memory=10Mi, limited: cpu=10m,memory=10Mi
Warning  FailedCreate  31s                replicaset-controller  Error creating: pods &quot;test-so2-7dd9c65cbd-qdq44&quot; is forbidden: exceeded quota: test-so, requested: cpu=10m,memory=10Mi, used: cpu=10m,memory=10Mi, limited: cpu=10m,memory=10Mi
Warning  FailedCreate  30s                replicaset-controller  Error creating: pods &quot;test-so2-7dd9c65cbd-69rn7&quot; is forbidden: exceeded quota: test-so, requested: cpu=10m,memory=10Mi, used: cpu=10m,memory=10Mi, limited: cpu=10m,memory=10Mi
Warning  FailedCreate  11s (x4 over 29s)  replicaset-controller  (combined from similar events): Error creating: pods &quot;test-so2-7dd9c65cbd-jjjl4&quot; is forbidden: exceeded quota: test-so, requested: cpu=10m,memory=10Mi, used: cpu=10m,memory=10Mi, limited: cpu=10m,memory=10Mi
</code></pre>
<p>So that means that in fact, even if a pod is in CrashLoopBackOff state, it still blocks the requested amount of memory.</p>
<p>We know it now ! hahaha</p>
<p>Have a nice day, bguess</p>
