This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.4.9. Allocating specific CPUs for nodes in a cluster
When using the static CPU Manager policy, you can reserve specific CPUs for use by specific nodes in your cluster. For example, on a system with 24 CPUs, you could reserve CPUs numbered 0 - 3 for the control plane allowing the compute nodes to use CPUs 4 - 23.
4.9.1. Reserving CPUs for nodes 复制链接链接已复制到粘贴板!
To explicitly define a list of CPUs that are reserved for specific nodes, create a KubeletConfig custom resource (CR) to define the reservedSystemCPUs parameter. This list supersedes the CPUs that might be reserved using the systemReserved and kubeReserved parameters.
Procedure
Obtain the label associated with the machine config pool (MCP) for the type of node you want to configure:
oc describe machineconfigpool <name>
$ oc describe machineconfigpool <name>Copy to Clipboard Copied! Toggle word wrap Toggle overflow For example:
oc describe machineconfigpool worker
$ oc describe machineconfigpool workerCopy to Clipboard Copied! Toggle word wrap Toggle overflow Example output
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 1
- Get the MCP label.
Create a YAML file for the
KubeletConfigCR:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Create the CR object:
oc create -f <file_name>.yaml
$ oc create -f <file_name>.yamlCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Additional resources
-
For more information on the
systemReservedandkubeReservedparameters, see Allocating resources for nodes in an OpenShift Container Platform cluster.