How to Configure OpenShift Overcommit

Arif KIZILTEPE
2 min readJan 27, 2023

--

What is OpenShift Overcommit?

OpenShift is a container orchestration platform developed by Red Hat. It is based on Kubernetes, and it allows users to deploy and manage containerized applications in a variety of environments.

Overcommit in OpenShift refers to the allocation of resources to pods and containers that exceed the available resources on the host. This can happen when the number of requested resources for pods exceeds the amount of resources available on the node. When overcommit occurs, the cluster may become unstable, and pods may become unresponsive or be terminated.

In OpenShift, overcommit is controlled by the resource quotas and limits that are set for projects and namespaces. These quotas and limits define the amount of resources that can be allocated to pods and containers within a given project or namespace. By setting appropriate quotas and limits, administrators can ensure that resources are allocated in a way that avoids overcommit and maintains the stability of the cluster.

Additionally, OpenShift also provides several ways to monitor and manage overcommit, such as oc adm top, oc describe pod, and oc describe node commands. These commands can be used to view the resource usage of pods, nodes, and the cluster as a whole, making it easier to identify and address overcommit issues.

In summary, OpenShift overcommit refers to the allocation of resources to pods and containers that exceed the available resources on the host. OpenShift administrators can control this by setting appropriate quotas and limits, and also by monitoring and managing the overcommit using various in-built commands.

Installation

  • Go to the OpenShift console and create a new project like this clusterresourceoverride-operator.
  • Go to the OperatorsOperatorHub. Install the ClusterResourceOverride operator on clusterresourceoverride-operator namespace.
  • Click Installed Operators ClusterResourceOverride Create Instance. When creating an instance can use the below yaml.
apiVersion: operator.autoscaling.openshift.io/v1
kind: ClusterResourceOverride
metadata:
name: cluster
spec:
podResourceOverride:
spec:
memoryRequestToLimitPercent: 50
cpuRequestToLimitPercent: 25
limitCPUToMemoryPercent: 200

memoryRequestToLimitPercent and cpuRequestToLimitPercent : how much of the resource you will request.

limitCPUToMemoryPercent : Specify the percentage to override the container memory limit, if used. Scaling 1Gi of RAM at 100 percent is equal to 1 CPU core. This is processed prior to overriding the CPU request if configured. The default is 200

Overcommit Operator ready.

Important Note: Overcommit operator only run with the label. Should add clusterresourceoverrides.admission.autoscaling.openshift.io/enabled: ‘true’ label in namespaces.

Example Namespace YAML.

kind: Project
apiVersion: project.openshift.io/v1
metadata:
name: cp4ba
labels:
clusterresourceoverrides.admission.autoscaling.openshift.io/enabled: 'true'
spec:
finalizers:
- kubernetes

--

--