How to use the full-pcpus-only options

Viewed 130

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

1 Answers

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
Related