liveBook · Manning

Resource utilization

As explained in Acing the Certified Kubernetes Administrator Exam, Second Edition

Resource utilization is the amount of CPU or memory currently consumed by a node or workload.

Resource utilization measures CPU or memory currently consumed by a node or workload. Use kubectl top to inspect actual usage, rather than resource allocation, which records pod requests and limits. section 8.2.2

Use utilization measurements for two operational tasks:

  • Inspect node consumption with kubectl top nodes; output reports CPU cores, CPU percentage, memory, and memory percentage. section 8.2.2
  • Drive Horizontal Pod Autoscaler decisions from CPU utilization calculated against configured CPU requests. section 5.1.5
  • Keep actual utilization separate from scheduler capacity: kubectl describe node shows allocated requests and limits, not current consumption. section 8.2.2

Measure and scale nginx

Set the nginx container's CPU request to 10m, then create an HPA targeting 80% utilization with two to five replicas. Verify consumption with kubectl top pod and observe the HPA target, such as cpu: 0%/80%. section 5.1.5

How Acing the Certified Kubernetes Administrator Exam, Second Edition covers it

How deep it goes
Explains kubectl measurements, HPA percentage calculation, and allocation distinctions, but stops short of metrics-server internals.
Examples
Uses nginx, kubectl top, kubectl autoscale, CPU requests, and node allocation output as operational examples.
What it assumes
Requires familiarity with CPU requests and limits before using utilization percentages for HPA configuration.
What you can do after
Diagnose resource pressure with kubectl top and distinguish current consumption from scheduler-visible allocation.
How it connects
Connects resource utilization to Horizontal Pod Autoscaler, CPU requests, resource limits, resource allocation, and Kubernetes scheduler capacity.

Also explained in

Compare how 8 books explain resource utilization →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Acing the Certified Kubernetes Administrator Exam, Second Edition. The section links point to the parts of the book it draws on.