Different outputs for CPU/Memory requests while running Prometheus query and oc describe

Solution Verified - Updated -

Issue

  • Different outputs for CPU/Memory requests while running Prometheus query and oc describe.
$ oc describe node <nodename> | tail -10
  (Total limits may be over 100 percent, i.e., overcommitted.)
  Resource                   Requests       Limits
  --------                   --------       ------
  cpu                        5972m (79%)    32190m (429%)

CPU requests: 79%
--------------------------------

Prometheus Query: 

sum(kube_pod_container_resource_requests{resource="cpu", node="<nodename>"}) / sum(kube_node_status_allocatable{resource="cpu", node="<nodename>"})

=  1.194933333333332  ----> 119%

Environment

  • Red Hat OpenShift Container Platform
    • 4.5

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content