Kubernetes Resource Requests Checker
Check Kubernetes manifests for missing resource requests and invalid limits, with QoS clues and scheduler-footprint evidence before rollout.| {{ header }} | Copy |
|---|---|
| {{ cell }} |
| {{ header }} | Copy |
|---|---|
| {{ cell }} |
| {{ header }} | Copy |
|---|---|
| {{ cell }} |
{{ patchText }}
{{ handoffStatus }}
Kubernetes schedules a Pod from declared resource requests, not from the workload's average usage. A missing or undersized CPU or memory request can pack too much work onto a node, while an oversized request can leave usable capacity stranded and keep a Pod pending.
Requests and limits answer different questions. A request reserves scheduler capacity. A limit sets a runtime ceiling or satisfies policy, depending on the resource and cluster configuration. CPU limits can throttle work; memory limits can lead to an out-of-memory termination. Neither value should be chosen merely to make a manifest look complete.
| Field | Primary role | Evidence for sizing |
|---|---|---|
| CPU request | Scheduler reservation and autoscaling baseline | Observed CPU, load tests, or recommendation data |
| Memory request | Scheduler reservation and eviction context | Working set, startup peaks, and justified headroom |
| CPU limit | Optional or policy-required runtime cap | Platform policy and throttling tolerance |
| Memory limit | Out-of-memory boundary | Failure behavior and safe peak memory |
| Ephemeral storage | Local writable-layer, log, cache, and scratch reservation | Measured local storage growth and eviction risk |
Container lifecycle changes the Pod footprint. App containers and native sidecars run together, so their requests add. Regular init containers run sequentially, so the largest init request competes with the concurrent sum rather than adding to it. Pod overhead and any Pod-level request then affect the final placement requirement.
Quality of Service (QoS) is another consequence of resource declarations. A Guaranteed Pod needs positive CPU and memory requests equal to limits for every evaluated container, or an equivalent complete Pod-level budget. Partial declarations become Burstable; no compute requests or limits becomes BestEffort. QoS describes eviction priority and resource treatment, not whether sizing is correct.
Quota, LimitRange, admission policy, and cluster-version support can add further requirements. Pod-level budgets may be accepted on newer clusters, but container-level requests remain the portable review baseline when cluster support or policy is uncertain.
Field coverage is only the first gate. Compare declared resources with live usage, restart history, pending events, replica counts, scaling behavior, and namespace budgets before changing production values.
How to Use This Tool:
Review the rendered manifest that will actually be applied, including all app, init, native sidecar, and ephemeral containers.
- Paste YAML or JSON for a Pod or supported workload template. Correct parse errors before using any coverage result.
- Select whether the gate requires CPU and memory requests, requests plus memory limits, or quota-ready requests and limits.
- Choose how Pod-level CPU and memory budgets affect missing container fields. Require container values for portability, treat Pod budgets as advisory, or accept them as coverage.
- Enable the ephemeral-storage audit when writable layers, logs, cache, scratch use, quota, or local-storage eviction matters.
- Resolve blockers first, then warnings. Replace every patch placeholder with a value supported by telemetry or policy; the scaffold does not supply safe quantities.
Interpreting Results:
Blockers include required missing fields, invalid quantities, and a limit below its matching request. Review covers warnings such as zero requests, missing policy-dependent limits, or Pod-level evidence retained for manual acceptance. Ready means the selected profile is covered, not that the values are well sized.
Use Scheduler footprint to understand placement, but verify live behavior with metrics and events. The reported footprint is per Pod; replica count is shown separately and is not multiplied into the effective request.
Technical Details:
Kubernetes quantities are normalized before comparison. CPU becomes integer millicores; memory and ephemeral storage become bytes. Binary suffixes such as Mi use powers of two, while decimal suffixes such as M use powers of ten. A malformed or negative quantity is blocking.
Formula Core
For each resource, the effective Pod request takes the largest of the concurrent-container sum, the largest regular init-container request, and the Pod-level request, then adds Pod overhead.
Native sidecar init containers count as concurrent. Regular init containers contribute only their per-resource maximum. Ephemeral containers are excluded because Kubernetes does not allow them to declare resource allocations.
The coverage percentage is the share of evaluated containers with no blocker or warning under the selected review profile.
Rule Core
| Condition | Result |
|---|---|
| Required request missing with no accepted Pod budget | Blocker |
| Required policy limit missing | Warning unless another blocking rule applies |
| Quantity cannot be normalized | Blocker |
| Limit is numerically lower than request | Blocker |
| Explicit request normalizes to zero | Warning |
| Pod budget exists under advisory mode | Warning; cluster support and policy still need review |
The source limit is 1 MiB with at most 500 containers. Visible rows can be limited from 10 through 300 without changing counts or verdicts.
Limitations and Privacy Notes:
Manifest analysis runs locally without contacting a cluster. It cannot observe usage, node capacity, admission defaults, quota consumption, or version support. Remove embedded Secrets and unrelated environment data before sharing a report.
Worked Examples:
Concurrent service with a large init step
Two running containers request 250m and 100m CPU, while a regular init container requests 500m. With no Pod-level request or overhead, the effective CPU request is max(350m, 500m, 0) = 500m. Adding the init request to 350m would overstate placement because the regular init container does not run concurrently.
Memory limit below request
A container requesting 512Mi with a 256Mi limit receives a blocker even though both fields are present. The limit must be raised to at least the request or both values must be revised from usage evidence.
References:
- Resource Management for Pods and Containers, Kubernetes Documentation.
- Init Containers, Kubernetes Documentation.
- Pod Quality of Service Classes, Kubernetes Documentation.
- How to check Kubernetes resource usage, Simplified Guide.