'How to use the full-pcpus-only options

I want to know how to activate the full-pcpus-only option.

The Doc makes me confused.

I have edit the /var/lib/kubelet/config.yaml to make the static policy work.

but when i add the option full-pcpus-only: true in this yaml the option doesn't work.

please tell me how to use the option.

My k8s version is V1.17.3. config.yaml



Solution 1:[1]

The full-pcpus-only option needs feature gates CPUManager and CPUManagerPolicyOptions. This yaml file for eksctl works:

apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig

metadata:
  name: k8s-Stokholm-Cluster
  region: eu-north-1

nodeGroups:
  - name: ng-1
    instanceType: c5.4xlarge
    desiredCapacity: 1
    kubeletExtraConfig:
      cpuManagerPolicy: static
      cpuManagerPolicyOptions:
        full-pcpus-only: "true"
      kubeReserved:
        cpu: "300m"
        memory: "300Mi"
        ephemeral-storage: "1Gi"
      kubeReservedCgroup: "/kube-reserved"
      systemReserved:
        cpu: "300m"
        memory: "300Mi"
        ephemeral-storage: "1Gi"
      featureGates:
        CPUManager: true
        CPUManagerPolicyOptions: true

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 user936580