Reserve CPUs for nodes
You can explicitly define a list of CPUs that are reserved for critical system processes on specific nodes by creating a KubeletConfig custom resource (CR) to define the reservedSystemCPUs parameter. Reserving CPUs for critical system processes can help ensure cluster stability.
This list supersedes the CPUs that might be reserved by using the systemReserved parameter.
For more information on the systemReserved parameter, see "Allocating resources for nodes in an OpenShift Container Platform cluster".
-
You have the label associated with the machine config pool (MCP) for the type of node you want to configure:
-
Create a YAML file for the
KubeletConfigCR:apiVersion: machineconfiguration.openshift.io/v1 kind: KubeletConfig metadata: name: set-reserved-cpus spec: kubeletConfig: reservedSystemCPUs: "0,1,2,3" machineConfigPoolSelector: matchLabels: pools.operator.machineconfiguration.openshift.io/worker: "" #...where:
metadata.name-
Specifies a name for the CR.
spec.kubeletConfig.reservedSystemCPUs-
Specifies the core IDs of the CPUs you want to reserve for the nodes associated with the MCP.
spec.machineConfigPoolSelector.matchLabels-
Specifies the label from the MCP.
-
Create the CR object:
$ oc create -f <file_name>.yaml