October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run ScanOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk5 min

How to Configure Kubernetes Resource Requests and Limits for Reliable Scheduling

Kubernetes requests reserve capacity for scheduling; limits control runtime CPU and memory. Learn how to size both and avoid policy-driven scheduling failures.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Set resource requests to tell Kubernetes what capacity a Pod needs for placement; set limits to control how much CPU or memory a container can consume at runtime. Reliable configuration comes from observing the workload, checking node allocatable capacity, and accounting for namespace policies—not from copying universal CPU or memory values.

Requests and limits do different jobs

For containers, the usual fields are resources.requests.cpu, resources.requests.memory, resources.limits.cpu, and resources.limits.memory. Requests guide scheduling; limits govern runtime resource use. On Linux, container runtimes typically apply these controls through kernel cgroups.

As an Amazon Associate I earn from qualifying purchases.

Setting Where it matters What it does Typical consequence of a mismatch
CPU request Scheduler; relative allocation under contention Reserves CPU capacity for placement and can contribute a relative weight when containers compete for CPU. An oversized request can leave a Pod pending even when current CPU use is low; an undersized request can leave too little capacity reserved for placement.
CPU limit Runtime Imposes a CPU ceiling. When the container reaches the ceiling, it can be throttled.
Memory request Primarily the scheduler Informs placement rather than acting as a general runtime memory cap. On cgroups v2, a runtime might use it as a hint for memory.min or memory.low. An oversized request can block placement; it does not by itself prevent memory use from rising above the request.
Memory limit Runtime and kernel Constrains memory use for the cgroup. Exceeding it can trigger the kernel out-of-memory subsystem and terminate the container.

The scheduler accounts for requests, not a snapshot of current consumption. Kubernetes puts it this way: “The scheduler ensures that, for each resource type, the sum of the resource requests of the scheduled containers is less than the capacity of the node.” See the official Resource Management for Pods and Containers documentation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Choose values from workload evidence and available capacity

There is no generally correct request or limit for an application. A request should describe the capacity the scheduler needs to reserve for reliable placement; a limit should reflect the runtime ceiling the workload can tolerate. Treat these as separate decisions, especially for CPU: reserving a baseline does not mean the process must stop at that level, while a limit can constrain bursts.

#1 Best Overall
  1. Observe representative demand. Measure normal operation and meaningful peaks for the workload and its relevant operating conditions. Avoid sizing from an unusually quiet moment.
  2. Set requests for placement. Choose CPU and memory requests that reflect the capacity the scheduler should reserve. Check them against node allocatable capacity, not just raw node size: a Pod is eligible only when a node can satisfy its requests.
  3. Choose runtime ceilings deliberately. Decide whether a CPU ceiling’s possible throttling is acceptable and whether a memory ceiling’s possible termination is an acceptable failure mode. Base those choices on workload behavior rather than treating limits as interchangeable with requests.
  4. Check namespace policy and the admitted Pod. Defaults, validation rules, and quotas can change whether a Pod is accepted and what resource values it receives. Inspect the Pod specification after admission instead of assuming omitted fields stayed omitted.
  5. Review behavior and revise. Compare observed use and scheduling outcomes with the assumptions behind the values, then adjust as the workload or cluster changes.

Kubernetes CPU quantities use CPU units: 1 represents one physical or virtual core, and 100m represents one tenth of a CPU. Memory quantities commonly use units such as Mi and Gi; use valid Kubernetes quantity syntax and choose binary units deliberately.

Start with a manifest pattern, not copied quantities

This illustrative Pod shows where values go. The angle-bracketed entries are placeholders, not valid quantities or recommendations; replace them with valid quantities supported by workload observations and cluster policy before applying a manifest.

apiVersion: v1
kind: Pod
metadata:
  name: example
spec:
  containers:
    - name: app
      image: example-image
      resources:
        requests:
          cpu: "<observed-baseline-or-reservation>"
          memory: "<observed-baseline-or-reservation>"
        limits:
          cpu: "<chosen-cpu-ceiling>"
          memory: "<chosen-memory-ceiling>"

Before using real values, confirm that their relationship satisfies namespace rules and produces the runtime behavior the workload needs. For example, setting a memory limit does not make a high memory request unnecessary: the request affects placement, while the limit constrains runtime use.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Understand the scope of container and Pod resources

Traditionally, a Pod’s request or limit for a resource is the sum of the respective values for its containers. The Kubernetes resource-management documentation describes Pod-level resource specification as beta since Kubernetes v1.34 and enabled by default, subject to the PodLevelResources feature gate. It documents CPU, memory, and hugepages at Pod level and says Pod-level requests and limits take precedence when both Pod-level and container-level values are present.

Do not assume that behavior exists in every cluster: support and feature-gate configuration depend on the Kubernetes release and cluster configuration. Check the resource-management documentation for the version actually running before relying on Pod-level values, and confirm how the configuration is admitted and enforced in that environment.

Use LimitRange and ResourceQuota for different namespace policies

Both mechanisms act at admission, but they address different questions. A LimitRange governs individual objects; a ResourceQuota caps aggregate namespace totals. They can be used together when a namespace needs per-object guardrails and a total budget.

Policy Scope and purpose Timing and practical effect
LimitRange Sets defaults and per-container or per-Pod minimums, maximums, or request-to-limit ratios. Defaults and validation apply during admission of new or updated Pods; running Pods are not retroactively changed. Inconsistent defaults—for example, a default limit below a submitted request—can result in a Pod that cannot be scheduled. If multiple LimitRange objects exist in one namespace, which default is selected is not deterministic.
ResourceQuota Caps aggregate namespace totals, such as the sum of CPU or memory requests or limits. A quota can require containers to specify CPU and memory values. If creating a Pod would exceed the quota, admission can reject it.

A limit submitted without its corresponding request may lead Kubernetes to assign a request equal to that limit. That can reserve more scheduling capacity than intended. Namespace defaults can also fill omitted fields, so verify the admitted Pod and the active policies before diagnosing a placement problem.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Use QoS class as a consequence, not a sizing shortcut

Kubernetes assigns a Pod Quality of Service (QoS) class based on its resource requests and limits. QoS is related to the values you configure, but it does not replace realistic sizing: a QoS label cannot make an unschedulable request fit on a node or prevent a memory limit from being exceeded. Check the actual requests, limits, and available capacity when investigating scheduling or runtime behavior.

Diagnose pending or rejected Pods by failure point

  • Pod is pending because no node can satisfy requests: compare its admitted requests with node allocatable capacity and other scheduled requests. Low current usage elsewhere does not make capacity available to the scheduler if that capacity is already committed by requests.
  • Pod is rejected at admission: inspect namespace quota totals and LimitRange constraints. A quota excess can reject creation; a default or bound can change values or make a submitted configuration invalid.
  • Container is throttled: check whether its CPU limit is restricting execution during the observed load, and decide whether that ceiling matches the workload’s needs.
  • Container is terminated after memory pressure: check its memory limit and actual demand. A memory request is a scheduling input, not a substitute for a deliberate runtime ceiling.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.