kubeletArguments:
kube-reserved:
- "cpu=200m,memory=512Mi"
system-reserved:
- "cpu=200m,memory=512Mi"
To provide more reliable scheduling and minimize node resource overcommitment, each node can reserve a portion of its resources for use by all underlying node components (e.g., kubelet, kube-proxy, Docker) and the remaining system components (e.g., sshd, NetworkManager) on the host. Once specified, the scheduler has more information about the resources (e.g., memory, CPU) a node has allocated for pods.
Resources reserved for node components are based on two node settings:
Setting | Description |
---|---|
|
Resources reserved for node components. Default is none. |
|
Resources reserved for the remaining system components. Default is none. |
You can set these in the kubeletArguments
section of the
node
configuration file (the /etc/origin/node/node-config.yaml file by default)
using a set of <resource_type>=<resource_quantity>
pairs (e.g.,
cpu=200m,memory=512Mi). Add the section if it does not already exist:
kubeletArguments:
kube-reserved:
- "cpu=200m,memory=512Mi"
system-reserved:
- "cpu=200m,memory=512Mi"
Currently, the cpu
and memory
resource types are supported. For cpu
,
the resource quantity is specified in units of cores (e.g., 200m, 0.5, 1).
For memory
, it is specified in units of bytes (e.g., 200Ki, 50Mi, 5Gi).
See Compute Resources for more details.
If a flag is not set, it defaults to 0. If none of the flags are set, the allocated resource is set to the node’s capacity as it was before the introduction of allocatable resources.
An allocated amount of a resource is computed based on the following formula:
[Allocatable] = [Node Capacity] - [kube-reserved] - [system-reserved]
If [Allocatable]
is negative, it is set to 0.