This scenario is a DEVELOPMENT scenario, not a production one
The pods CPU are configured with both REQUESTS and LIMITS which are “fit”: when someone is testing that app, it won’t be bellow the Requests and the limit indicates performance degradation.
BUUUUUUUUT, About 80%+ of the time, they are not being used because this is a dev environment.
The problem is that, when you look at the node, out of the 4000m available, only 1000m is being used and there are several pods not being scheduled because of insufficient CPU…
How can I change this behavior and tell kubernetes “I know each node has only X of real power, but I want you to allow that the sum of requests go up to 2X”?
The root issue here is that Kubernetes schedules based on requests, so the only way to pack more pods on a node than capacity “allows” is to lower the requests themselves — which you don’t want to do manually per-pod.
One approach we’ve been running in production at Inditex: a mutating admission webhook that automatically adjusts requests based on configurable overcommit ratios, applied via pod or namespace labels. You define something like “this namespace gets cpuOvercommit: 0.2 (20% of limit as request)” and the webhook handles the rest at admission time.
We open-sourced it: GitHub - InditexTech/k8s-overcommit-operator: A Kubernetes operator designed to intelligently manage resource overcommit on pod resource requests. · GitHub
Supports Helm install, OLM/OpenShift, regex-based namespace exclusions for critical system namespaces. Might be what you’re looking for for the dev environment case.