Pcornel
Browse topics
Options
Recent
Favorites
Containers · Technical reference

Container Troubleshooting

Direct answer

Container troubleshooting follows the pod lifecycle: scheduling, image pull, container start, probes and runtime behaviour, using status, events, logs and exec.

When to use this

Use it as the entry point when a container or pod is not working.

First 30 seconds

1. kubectl get pod — status and restarts.

2. kubectl describe pod — events.

3. kubectl logs <pod> --previous.

4. kubectl exec -it <pod> -- sh (or kubectl debug).

5. Fix and watch kubectl get pod -w.

Operational verification

schedule → pull → start → probes → running

Evidence · next step

The biggest diagnostic errors are restarting before capturing the original reason, assuming CrashLoopBackOff is the root cause rather than backoff behavior, treating Pending as a runtime failure, or widening permissions/network policy without proving that layer is responsible. 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
Common mistakes
What not to infer

This Topic owns cross-container failure triage. Deep host, network, storage, security and telemetry diagnosis remains in the responsible Domain and should be linked rather than duplicated.

Platform / version applicability
Docker / containerd / Podman / Kubernetes / OCI-compatible platforms
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformDocker / containerd / Podman / Kubernetes / OCI-compatible platforms · This Topic owns cross-container failure triage. Deep host, network, storage, security and telemetry diagnosis remains in the owning Domain and should be linked rather than duplicated.
Scope / prerequisiteUse it as the entry point when a container or pod is not working.
What next?3 suggested next steps
Child topics (this level)4
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

2 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Verification workflow Verify boundary

Start with the object/container current state, reason, exit code and event timeline. Preserve the first concrete error, then test the adjacent dependency using stable identity: image digest, Pod/container ID, node, volume or service endpoint. After repair, rerun the original bounded check and verify the consumer-visible service.

Step 2 Failure signatures and limits Narrow the fault

The biggest diagnostic errors are restarting before capturing the original reason, assuming CrashLoopBackOff is the root cause rather than backoff behavior, treating Pending as a runtime failure, or widening permissions/network policy without proving that layer is responsible.

Evidence references

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.

test · 1
Drill down

Subtopics

Go one level deeper into this subject.

Key points

Read status and events first (describe), then logs (--previous for crashes), then exec into the container. Typical states: Pending, ImagePullBackOff, CrashLoopBackOff, OOMKilled, not Ready.

Key checks
  • kubectl get pod — first check for this topic
  • kubectl get pods -o wide — pods, status, node, IP
  • kubectl describe pod <pod> — events and conditions
  • kubectl 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

Container Troubleshooting is a failure-signature index across runtime and Kubernetes layers. The goal is to identify the first step that has not been verified—image acquisition, scheduling, runtime creation, process exit, networking, storage, node capacity or application readiness—rather than retrying everything at once.

ReferenceHow it works1 section · depth on demand

In depth

Container troubleshooting starts by asking the platform what it observed — events, status and logs — before entering the container. Most problems fall into a handful of patterns.

SymptomLikely causeFirst check
ImagePullBackOff / pull errorsWrong name/tag, missing registry credentials, rate limitskubectl describe pod, docker pull
CrashLoopBackOff / container exitsApplication error, bad config, missing env/secretkubectl logs --previous, docker logs
OOMKilledMemory limit too low or leakkubectl describe pod (Last State)
PendingNo node fits requests/affinity, unbound PVCEvents: FailedScheduling
Service unreachableSelector mismatch, no ready endpoints, NetworkPolicykubectl get endpointslices, probes
Works locally, not in clusterDNS, env differences, permissions (non-root, read-only FS)Compare specs
kubectl get events -n apps --sort-by=.lastTimestamp | tail
kubectl debug -it <pod> --image=busybox --target=<container>
docker inspect --format '{{.State.ExitCode}} {{.State.Error}}' app

Exit codes help: 137 = killed (often OOM), 139 = segmentation fault, 1/2 = application error.

ReferenceImportant terms & boundaries1 section · depth on demand

Scope map

  • ImagePullBackOff / ErrImagePull
  • CrashLoopBackOff
  • Pending Pods
  • OOMKilled
  • DNS/service reachability
  • Port exposure/NAT mistakes
  • Volume mount failures
  • Node pressure
  • Runtime/daemon unavailable
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical examples

Configuration & expected output

Concrete examples are shown only when the stored reference contains an actual configuration or output shape for this Topic.

Configuration example

Kubernetes Kubernetes 1.28 or laterFirst-pass triage commands for a failing Pod.

Assumptions: Replace namespace and Pod name.

kubectl -n app get pod api-6d9f7c-abcde -o wide
kubectl -n app describe pod api-6d9f7c-abcde
kubectl -n app logs api-6d9f7c-abcde --previous
kubectl -n app get events --sort-by=.lastTimestamp | tail -20

Expected output

Kubernetes Kubernetes 1.28 or laterkubectl -n app get pod api-6d9f7c-abcde

Expected state: A healthy Pod is Running with all containers ready and a stable restart count.

NAME               READY   STATUS    RESTARTS   AGE
api-6d9f7c-abcde   1/1     Running   0          12m
CrashLoopBackOff points to the container exiting (read logs --previous); ImagePullBackOff to registry or credentials; Pending to scheduling (read describe events). Illustrative authored output: field layout matches the tool, values will differ in your environment.
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-29 · otherOCI / Docker / containerd / Kubernetes Kubernetes current documentation

Documentation verification: confirms the upstream model used by the Topic. It does not assert local production behavior.

Basis: https://kubernetes.io/docs/tasks/debug/ · confidence 92%
Technical changelog & impact

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.

Related reference impactReview these references after material technical changes when their shared boundary is affected.
Terminology layer

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.

Aliases that resolve here
container troubleshootingCrashLoopBackOffImagePullBackOffOOMKilled container
Embedded reference data

Quick lookup tables

Container Troubleshooting verification boundary matrix

A compact lookup separating intent, owning component state, effective state and consumer-visible outcome for Container Troubleshooting.

BoundaryInspectHealthy interpretationDo not infer
IntentImagePullBackOff / ErrImagePullIntended object/scope is explicit and versioned where relevantIntent is already effective
Owning runtime/control planeCrashLoopBackOff / Pending PodsOwner accepts and reports the expected object stateDownstream dependencies are healthy
Effective stateOOMKilledIndependent read-back matches the intended stateEvery client sees the same result
Consumer outcomeDNS/service reachabilityThe original bounded check succeeds in the same time windowProduction correctness outside this scope
Depth when you need it

Deep reference

Design & tradeoffs

Scope

Deep host, network, storage, security and telemetry diagnosis remains in the responsible Domain and should be linked rather than duplicated.

Confirmation

Confirm action

Continue?