<p>I have a cluster and set up kubelet on a node (name is <code>myNode</code>) with the <code>static</code> CPU Manager Policy. So I've started kubelet with <code>--cpu-manager-policy=static</code> (to set the static policy) and <code>--reserved-cpus=1</code> (to make sure kubelet has one core to run on exclusively) as explained <a href="https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/#static-policy" rel="nofollow noreferrer">here</a>.</p>
<p>Checking <code>/var/lib/kubelet/cpu_manager_state</code> it gives me</p>
<pre class="lang-bash prettyprint-override"><code>cat /var/lib/kubelet/cpu_manager_state
{&quot;policyName&quot;:&quot;static&quot;,&quot;defaultCpuSet&quot;:&quot;0-3&quot;,&quot;checksum&quot;:611748604}
</code></pre>
<p>which should be fine. I then start a pod with the following pod spec</p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: v1
kind: Pod
metadata:
  name: wl
  labels:
    app: wl
spec:
  containers:
  - name: wl
    image: docker.io/polinux/stress:latest
    imagePullPolicy: IfNotPresent
    command: [&quot;/bin/sh&quot;,&quot;-c&quot;]
    args: [&quot;echo 'workload' &amp;&amp; stress --cpu 4&quot;]
    resources:
      requests:
        cpu: 1
      limits:
        cpu: 1
  nodeName: myNode
</code></pre>
<p>and start it. It get's scheduled on the desired node &quot;myNode&quot;. I then check for the processes with</p>
<pre class="lang-bash prettyprint-override"><code>ps aux | grep stress
root     2966141  0.2  0.0    780     4 ?        Ss   10:54   0:00 stress --cpu 4
root     2966154 27.1  0.0    780    36 ?        R    10:54   0:02 stress --cpu 4
root     2966155 26.7  0.0    780    36 ?        R    10:54   0:02 stress --cpu 4
root     2966156 28.6  0.0    780    36 ?        R    10:54   0:02 stress --cpu 4
root     2966157 27.3  0.0    780    36 ?        R    10:54   0:02 stress --cpu 4
</code></pre>
<p>and then which CPUs they are running on with</p>
<pre class="lang-bash prettyprint-override"><code>ps -o pid,psr,comm -p 2966154 2966155 2966156 2966157
    PID PSR COMMAND
2966154   0 stress
2966155   1 stress
2966156   2 stress
2966157   3 stress
</code></pre>
<p>It looks like there are 4 processes running, but all of them on different CPUs. I would have expected that the Pod fails to run since it's allowed to only run on one core while the <code>stress --cpu 4</code> wants to start 4 threads on 4 CPUs. With the default CPU Manager Policy, this would be the expected behavior, but I've configured the static one.</p>
<p>Any hint what the problem could be?</p>

Wolfson
<p>You also need to provide memory request and limit in order to qualify for the <em>Guaranteed</em> tier and exclusive cores:</p>
<pre><code>apiVersion: v1
kind: Pod
metadata:
  name: wl
  labels:
    app: wl
spec:
  containers:
  - name: wl
    image: docker.io/polinux/stress:latest
    imagePullPolicy: IfNotPresent
    command: [&quot;/bin/sh&quot;,&quot;-c&quot;]
    args: [&quot;echo 'workload' &amp;&amp; stress --cpu 4&quot;]
    resources:
      requests:
        cpu: &quot;1&quot;
        memory: &quot;200Mi&quot;
      limits:
        cpu: &quot;1&quot;
        memory: &quot;200Mi&quot;
  nodeName: myNode
</code></pre>
<p>Verify the Pod by <code>kubectl describe pod wl</code></p>
