Kube-reserved setting is not being set in OpenShift

Solution Verified - Updated

Environment

  • Red Hat OpenShift Container Platform (RHOCP)
  • 4
  • kubeReserved

Issue

  • When configuring node resources like the following, the kube-reserved is being ignored.

    KUBELET_EXTRA_ARGS="--system-reserved=cpu=10%,memory=10% --kube-reserved=cpu=10%,memory=10% --enforce-node-allocatable=pods,kube-reserved,system-reserved" 
    

Resolution

For reserving CPU and memory resources in nodes, set the systemReserved setting instead. From the understanding how to allocate resources for nodes documentation:

The system-reserved setting in the KubeletConfig custom resource (CR) identifies the resources to reserve for the node components and system components, such as CRI-O and Kubelet. The default settings depend on the OpenShift Container Platform and Machine Config Operator versions. Confirm the default systemReserved parameter on the machine-config-operator repository.

and

The Kubernetes kubeReserved parameter is not supported in OpenShift Container Platform.

Refer to which amount of CPU and memory are recommended to reserve for the system in OpenShift 4 nodes for additional information about recommended values.

Root Cause

The Kubernetes kubeReserved parameter is not supported in OpenShift Container Platform.

SBR
Category
Tags

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.