Use it when pods are Pending, get OOMKilled or throttled, or restart because of probes.
Scheduling, Resources & Health
Scheduling, resources and health: the scheduler places pods on nodes that fit their requests, affinity and tolerations; limits cap usage; probes tell Kubernetes when a container is alive and ready.
1. Pending → kubectl describe pod scheduling events.
2. OOMKilled → kubectl get pod -o jsonpath='{.status.containerStatuses[*].lastState}'.
3. Usage vs requests: kubectl top pod.
4. Probe failures in events.
5. Adjust requests/limits/probes.
pod requests → scheduler filters/scores nodes → bound → kubelet enforces limits → probes report health
Common failures are impossible affinity rules, untolerated taints, oversized requests, CPU throttling, memory OOMKills, liveness probes causing restart storms, readiness probes masking dependency failures and node pressure triggering evictions. Preserve the first divergent observation and repeat the same bounded verification after remediation.
Continue only after interpreting the current observation.Context & applicabilityCommon mistakes · platform/version boundaries
Containers owns Kubernetes scheduling/resource/probe semantics. Linux owns host resource/kernel depth; Observability owns long-term resource telemetry and alerting.
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Verification workflow Verify boundary
For a Pending or unstable Pod, inspect scheduler events, requests, selectors/affinity, taints/tolerations and node allocatable resources. For a running Pod, compare limits/usage, QoS, OOM/eviction history and probe results; verify readiness from the consumer path rather than only from kubelet.
Step 2 Failure signatures and limits Narrow the fault
Common failures are impossible affinity rules, untolerated taints, oversized requests, CPU throttling, memory OOMKills, liveness probes causing restart storms, readiness probes masking dependency failures and node pressure triggering evictions.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
Subtopics
Go one level deeper into this subject.
Requests reserve CPU and memory for scheduling; limits cap what a container may use at runtime.
Subtopic Liveness, Readiness and Startup ProbesProbes let the kubelet check container health: readiness controls traffic, liveness restarts stuck containers and startup protects slow starts.
Subtopic Taints, Tolerations and AffinityTaints repel Pods from nodes unless they tolerate them; affinity and anti-affinity attract Pods to, or spread them across, nodes and zones.
Subtopic Horizontal Pod AutoscalerThe Horizontal Pod Autoscaler (HPA) changes a workload's replica count based on metrics such as CPU use against requests or custom metrics.
Set requests to real usage and memory limits to protect nodes. A memory limit hit → OOMKilled (exit 137). Readiness gates traffic; liveness restarts; startup protects slow starts.
kubectl top pod— current CPU/memory usekubectl get pods -o wide— pods, status, node, IPkubectl describe pod <pod>— events and conditionskubectl logs <pod> [-c <c>] [--previous]— container logs (incl. previous crash)kubectl get events --sort-by=.lastTimestamp— recent cluster events
ReferenceWhat it is1 section · depth on demand
Operating model
Scheduling, Resources & Health explains how Kubernetes decides where Pods can run, how much CPU/memory they may request or consume, and how probes/eviction signals influence traffic and restart behavior. Scheduling feasibility, runtime resource pressure and application health are separate layers.
ReferenceHow it works1 section · depth on demand
In depth
Scheduling, resources and health determine where pods run, how much CPU and memory they get, and how Kubernetes decides they are working. Wrong settings cause pending pods, OOM kills, throttling and traffic sent to unready instances.
| Setting | Effect |
|---|---|
resources.requests | Used for scheduling; guaranteed share |
resources.limits | Maximum; memory over limit → OOMKilled, CPU over limit → throttled |
| Node selectors, affinity, taints/tolerations | Control placement |
| Topology spread constraints | Spread replicas across zones/nodes |
| PodDisruptionBudget | Keep minimum replicas during maintenance |
| Readiness probe | Receive traffic only when ready |
| Liveness probe | Restart when stuck |
| Startup probe | Give slow starters time before liveness checks |
kubectl describe pod <pod> | grep -A5 -E 'Requests|Limits|Events'
kubectl top pods -n apps
kubectl get events -n apps --field-selector reason=FailedScheduling
Set requests from measured usage, use memory limits to protect nodes, and keep liveness probes conservative — aggressive liveness checks cause restart loops under load.
ReferenceImportant terms & boundaries1 section · depth on demand
Scope map
- Requests and limits
- QoS classes
- Node selectors
- Affinity/anti-affinity
- Taints and tolerations
- Liveness/readiness/startup probes
- Eviction and node pressure
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Configuration & expected output
Concrete examples are shown only when the stored reference contains an actual configuration or output shape for this Topic.
Configuration example
Assumptions: Replace values with measured usage for the workload.
resources:
requests: {cpu: 250m, memory: 256Mi}
limits: {memory: 512Mi}
livenessProbe:
httpGet: {path: /livez, port: 8080}
initialDelaySeconds: 10
periodSeconds: 10
readinessProbe:
httpGet: {path: /readyz, port: 8080}
periodSeconds: 5Expected output
kubectl describe node worker-1 | sed -n '/Allocated resources/,/Events/p'Expected state: Requested CPU and memory stay below allocatable capacity, so new Pods can still be scheduled.
Allocated resources:
Resource Requests Limits
-------- -------- ------
cpu 1850m (46%) 500m (12%)
memory 2304Mi (30%) 4096Mi (53%)The scheduler uses requests, not live usage. A memory limit that is too low shows up as OOMKilled in the Pod's last state. Illustrative authored output: field layout matches the tool, values will differ in your environment.Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Documentation verification: confirms the upstream model used by the Topic. It does not assert local production behavior.
Basis: https://kubernetes.io/docs/concepts/scheduling-eviction/ · confidence 92%What changed and what may be affected
Recent technical edits are separated from ordinary page timestamps. Relationship impact is advisory: it identifies nearby canonical references to review, not automatic breakage.
Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.
Quick lookup tables
Scheduling, Resources & Health verification boundary matrix
A compact lookup separating intent, owning component state, effective state and consumer-visible outcome for Scheduling, Resources & Health.
| Boundary | Inspect | Healthy interpretation | Do not infer |
|---|---|---|---|
| Intent | Requests and limits | Intended object/scope is explicit and versioned where relevant | Intent is already effective |
| Owning runtime/control plane | QoS classes / Node selectors | Owner accepts and reports the expected object state | Downstream dependencies are healthy |
| Effective state | Affinity/anti-affinity | Independent read-back matches the intended state | Every client sees the same result |
| Consumer outcome | Taints and tolerations | The original bounded check succeeds in the same time window | Production correctness outside this scope |
Deep reference
Design & tradeoffs
Scope
Containers owns Kubernetes scheduling/resource/probe semantics. Linux owns host resource/kernel depth; Observability owns long-term resource telemetry and alerting.