In Openshift/Kubernetes, I want to test how my application (pod) that consists of 2 containers performs on machines with different number of cores. The machine I have at hand has 32 cores, but I'd like to limit those to 4, 8, 16...
One way is using resource limits on the containers, but that would force me to set the ratio on each container; instead, I want to set resource limits for whole pod and let the containers compete on CPU. My feeling is that this should be possible, as the containers could belong to the same cgroup and therefore share the limits from the scheduler POV.
Would the LimitRange
on pod do what I am looking for? LimitRange is project/namespace -scoped, is there a way to achieve the same with finer granularity (just for certain pods)?