liveBook · Manning

Resource allocation

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

Resource allocation is the CPU and memory capacity reserved for workloads through their resource requests.

Resource allocation describes the CPU and memory capacity reserved for workloads through their resource requests. Kubernetes uses these requests when deciding whether a node can schedule additional pods. Distinguish allocation from utilization: allocation comes from requested resources, while utilization shows current consumption. section 8.2.2

Check node capacity and diagnose scheduling or worker-node problems with:

  • kubectl top nodes shows actual CPU and memory utilization. section 8.2.2
  • kubectl describe node shows the Allocated resources section, including pod requests and limits. section 8.2.2
  • Compare allocated requests with remaining node capacity to determine whether more pods fit. section 8.2.2
root@kind-control-plane:~# kubectl describe node kind-control-plane |
 grep Allocated -A 5
Allocated resources:
  (Total limits may be over 100 percent, i.e., overcommitted.)
  Resource           Requests     Limits
  --------           --------     ------
  cpu                1050m (52%)  100m (5%)
  memory             490Mi (24%)  390Mi (19%)

Inspect representative Allocated resources output showing requests and limits as node percentages. section 8.2.2

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

How deep it goes
Distinguishes requested allocation from live utilization and applies both kubectl views, but does not develop resource specification design.
Examples
Uses kubectl top nodes and kubectl describe node output to compare utilization, requests, limits, and remaining capacity.
What it assumes
Assumes familiarity with nodes and pods while establishing the allocation-versus-utilization distinction from operational output.
What you can do after
Diagnose node capacity and scheduling fit with kubectl top and kubectl describe node.
How it connects
Connects resource requests and limits with nodes, pods, scheduling, utilization, and worker-node troubleshooting.

Also explained in

Compare how 3 books explain resource allocation →

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.