The five-step Kubernetes troubleshooting loop
- Scope the failure. Identify the namespace, workload, affected replicas, and whether the symptom is isolated or cluster-wide.
- Read current and previous state. Inspect status, events, container termination reasons, previous logs, probes, limits, and controller ownership.
- Correlate the change. Check rollouts, image versions, configuration updates, node movement, and dependency failures.
- Choose the smallest reversible action. Prefer bounded fixes. Keep destructive or state-changing actions behind approval.
- Verify the outcome. Confirm readiness, restart counts, fresh events, rollout state, and application behavior before closing the incident.
Do not treat a restart as a diagnosis. Restarting may restore capacity, but previous termination state and events usually contain the evidence needed to prevent recurrence.
Start with the controller, not only the pod
A Pod is usually the current instance of a desired workload managed by a Deployment, StatefulSet, DaemonSet, Job, or another controller. When a pod fails, record its owner before changing it. Deleting a managed pod can create a fresh instance while hiding the configuration problem that caused the failure. Compare the controller specification, active ReplicaSet, rollout conditions, and the exact image or configuration revision that is running.
Next, establish a timeline. Sort recent events, note the container start and finish times, read both current and previous logs, and compare them with the last rollout or configuration change. Kubernetes events are useful clues but may be aggregated or expire; they are not a durable incident record. Preserve the relevant evidence before a restart or rollout changes it.
Common Kubernetes symptoms and first checks
CrashLoopBackOff
Read previous container logs, termination reason, probes, limits, and recent rollout history. The backoff is a symptom, not the root cause.
OOMKilled
Compare the configured memory limit with observed working-set evidence. Check whether the issue followed a release or traffic change.
Pending pods
Inspect scheduling events for insufficient resources, affinity conflicts, taints, volume binding, or quota failures.
ImagePullBackOff
Verify the image reference, registry reachability, pull secret, service account, and whether the tag or digest exists.
Node pressure
Check node conditions, allocatable capacity, evictions, disk use, and whether multiple workloads share the same failure domain.
Failed rollout
Compare ReplicaSets, deployment conditions, readiness failures, and the exact manifest difference introduced by the release.
Read probes and resource limits together
Readiness, liveness, and startup probes answer different questions. A readiness failure should remove a pod from Service endpoints; it should not by itself restart the container. A liveness failure can trigger a restart, while a startup probe delays the other probes for slow-starting applications. Look at the probe path, port, timeout, thresholds, and application startup behavior before increasing delays. A probe can expose a real dependency failure, but it can also create a restart loop when it is too aggressive.
For OOMKilled containers, distinguish a container memory limit from node-level pressure. Inspect the termination reason and configured requests and limits, then compare the problem with the application workload and release history. Raising a limit without understanding allocation behavior can postpone the next failure or move pressure to the node. The corrective action should follow the evidence: fix a regression, tune concurrency, adjust resources with capacity in mind, or roll back a known bad release.
How KubeAgent applies the workflow
The in-cluster agent (or kubeagent watch from your terminal) checks the cluster on an interval with rule-based checks that use no AI. When it detects a problem, it gathers relevant logs, events, resource state, recent rollouts and knowledge-base context before proposing a cause and action. Actions on your allow-list can run automatically; other supported writes need approval — through Slack and the dashboard for the agent, in the terminal for watch — and are denied in non-interactive mode; tools outside the supported action surface are not exposed to the model.
The useful boundary is not “AI versus manual.” It is whether the available evidence supports a bounded action with a clear blast radius and a verifiable success condition. See the Kubernetes auto-remediation guide for the policy model.
When manual troubleshooting is still right
Use a human-led investigation for novel control-plane failures, unclear stateful-system behavior, security incidents, or any event where the available evidence cannot bound the blast radius. Pause automation if two controllers may act on the same resource, if external state is involved, or if the proposed change cannot be reversed. Automation should reduce repetitive work, not manufacture confidence.
A recovery checklist
- Confirm the desired and available replica counts, rollout conditions, and pod readiness.
- Check that restart counts and warning events have stopped increasing.
- Exercise the application path that users depend on; pod readiness alone is not proof of service recovery.
- Record the cause, evidence, exact action, approver when applicable, and verification result.
- Create follow-up work for configuration, capacity, testing, or alerting changes that prevent recurrence.
Sources and further reading
This guide is based on the upstream Kubernetes debugging model and resource behavior, then applies KubeAgent's documented action boundaries.