Kubernetes Troubleshooting Guide: A Symptom-to-Root-Cause Reference
KubernetesContainersTroubleshootingCloud Nativekubectl

Kubernetes Troubleshooting Guide: A Symptom-to-Root-Cause Reference

MMidways Cloud Editorial Team
2026-11-27
7 min read

A practical Kubernetes troubleshooting guide for diagnosing Pending pods, CrashLoopBackOff, failed probes, networking, storage, and configuration issues.

Kubernetes failures are easier to resolve when you diagnose observable symptoms in a consistent order. This Kubernetes troubleshooting guide provides a practical path from pod status and events to scheduling, storage, networking, configuration, and application-level root causes, with kubectl commands you can use during an incident without making the situation harder to understand.

Overview

Start with evidence, not assumptions. A pod that appears to be “down” may be waiting for a node, unable to mount storage, restarting because its process exits, failing a probe, or serving traffic incorrectly through a Service. Each condition produces different evidence and requires a different remedy.

A useful Kubernetes troubleshooting workflow has four goals:

  • Define the affected workload, namespace, node, and time window.
  • Separate a scheduling or infrastructure problem from an application problem.
  • Use events, logs, and resource descriptions to identify the first meaningful failure.
  • Make the smallest safe change, then verify recovery from the user-facing path.

Preserve relevant output before changing resources. During an incident, record the deployment revision, recent configuration changes, pod names, event messages, and timestamps. This creates a handoff trail for other responders and supports a later review. If the issue follows a release, compare the investigation with your production release readiness checklist rather than treating every symptom as a cluster defect.

Symptom-to-root-cause reference

SymptomLikely areasFirst checks
Pod is PendingResources, taints, affinity, node capacity, unbound storagekubectl describe pod, scheduler events, PVC status
Pod is CrashLoopBackOffApplication exit, bad command, missing configuration, probe failure, resource pressurePrevious-container logs, exit details, environment and volume references
Pod is Running but unreachableLabels, Service selectors, ports, NetworkPolicy, readinessEndpoints, Service definition, in-cluster connectivity
Readiness probe failsWrong path or port, slow startup, dependency failure, binding addressProbe configuration, pod logs, direct request from a temporary diagnostic pod
Volume will not mountPVC binding, access mode, topology, permissions, storage pluginPVC and pod events, volume attachment status, mount errors

Step-by-step workflow

1. Establish scope and current state

Confirm the namespace and identify whether the failure affects one pod, a workload, a node, or several services. Avoid relying on a single pod name because controllers may replace pods during the investigation.

kubectl get pods -n <namespace> -o wide
kubectl get deploy,sts,ds,job,svc,ingress -n <namespace>
kubectl get nodes
kubectl get events -n <namespace> --sort-by=.lastTimestamp

Look for a change in the number of desired, available, and ready replicas. A deployment with available replicas but failed requests may have a Service, ingress, or application issue rather than a scheduling failure.

2. Inspect the affected pod and its controller

Use describe for a readable summary of scheduling decisions, container states, probes, mounts, conditions, and recent events.

kubectl describe pod <pod> -n <namespace>
kubectl describe deployment <deployment> -n <namespace>
kubectl get pod <pod> -n <namespace> -o yaml

Read the output from the bottom upward, then check the container state near the top. The last event is not always the first cause. For example, a failed readiness probe may be a consequence of an application that could not load a required secret.

3. Check logs, including the previous container

For a restarting container, current logs can be empty or incomplete. The --previous option often exposes the startup error from the terminated instance.

kubectl logs <pod> -n <namespace> -c <container> --timestamps
kubectl logs <pod> -n <namespace> -c <container> --previous --timestamps
kubectl logs deploy/<deployment> -n <namespace> --all-containers=true

For a CrashLoopBackOff, check the exit code, termination reason, command and arguments, required environment variables, mounted files, and startup dependencies. Do not assume the status itself is the cause: CrashLoopBackOff describes Kubernetes backing off repeated restarts.

4. Diagnose scheduling and Pending pods

A Kubernetes pod remains Pending when the scheduler cannot place it or when a required initialization step, such as volume binding, has not completed. In the pod description, inspect events for insufficient CPU or memory, untolerated taints, node affinity conflicts, topology constraints, or unbound PVCs.

kubectl describe pod <pod> -n <namespace>
kubectl get nodes --show-labels
kubectl describe node <node>
kubectl get pvc -n <namespace>

Compare the pod's requests with allocatable capacity, not just the node's current usage. Check whether a deployment introduced a new node selector, affinity rule, or toleration requirement. If storage is involved, resolve the PVC state before changing application replicas.

5. Diagnose readiness, Services, and networking

A Running pod is not necessarily ready to receive traffic. Review the readiness probe's path, port, scheme, initial delay, timeout, and expected response. Confirm that the application listens on the interface and port the probe uses; a process bound only to localhost may pass an internal check differently from a Service request.

kubectl get pod <pod> -n <namespace> -o wide
kubectl describe pod <pod> -n <namespace>
kubectl get svc <service> -n <namespace> -o yaml
kubectl get endpointslice -n <namespace> -l kubernetes.io/service-name=<service>

Compare the Service selector with the pod labels. If there are no endpoint addresses, investigate selectors and readiness before focusing on ingress. If endpoints exist, test DNS and connectivity from inside the cluster using an approved diagnostic pod. NetworkPolicy rules, destination ports, and ingress configuration should then be checked in that order.

6. Diagnose storage and configuration

For mount failures, inspect the pod and PVC events together. Confirm that the claim is bound, the requested access mode is supported, and the pod is allowed to run where the volume is available. A change in node placement or topology can expose assumptions that were not visible in a single-node test.

For configuration failures, verify that referenced ConfigMaps and Secrets exist in the same namespace and contain the expected keys. Check the rendered workload rather than only the source manifest:

kubectl get configmap <name> -n <namespace> -o yaml
kubectl describe secret <name> -n <namespace>
kubectl get deployment <deployment> -n <namespace> -o yaml

Do not paste secret values into tickets or chat. If credentials may have been exposed, use the relevant secrets rotation runbook and record only the safe identifiers needed for coordination.

7. Apply one controlled change and verify

Prefer a reversible correction: restore a missing configuration key, fix a selector, adjust an incorrect port, or roll back a known-bad workload revision through the normal deployment process. Avoid deleting pods repeatedly as a diagnostic method; a restart may hide the evidence without correcting the cause.

After the change, verify the full path:

kubectl rollout status deployment/<deployment> -n <namespace>
kubectl get pods -n <namespace>
kubectl get endpointslice -n <namespace> -l kubernetes.io/service-name=<service>
kubectl logs deployment/<deployment> -n <namespace> --since=10m

Confirm readiness, traffic, error rate, and dependent operations. A green rollout is not sufficient if clients still receive timeouts or application errors.

Tools and handoffs

kubectl should remain the primary source for Kubernetes object state, events, logs, and rollout status. Cluster dashboards, centralized logs, metrics, tracing, and cloud-provider consoles are useful for correlation, but they should complement—not replace—the object and event data from the affected namespace.

For a clean handoff, include:

  • Namespace, workload, pod, node, and affected time window.
  • Exact symptom and user impact.
  • Relevant events, container exit details, and log excerpts with secrets removed.
  • Changes made, commands used, and the verification result.
  • A clear next owner if infrastructure, application, storage, or networking expertise is required.

When the incident is over, capture the timeline and follow-up actions using an SRE incident postmortem template. If the issue involves a cluster version change, consult the Kubernetes upgrade runbook before repeating the upgrade or rollback.

Quality checks

A troubleshooting result is stronger when another operator can reproduce the reasoning. Before closing the issue, check that:

  • The original symptom is no longer present from the user's or calling service's perspective.
  • All intended replicas are scheduled, ready, and stable across more than one observation.
  • Events no longer show new scheduling, mount, probe, or image-pull failures.
  • Service endpoints match the intended ready pods.
  • Logs do not show a new startup, authentication, dependency, or resource error.
  • The change is represented in the source manifest, deployment configuration, or runbook rather than only as a live edit.
  • Any temporary diagnostic pod, port-forward, debug container, or elevated access has been removed.

For recurring failures, classify the root cause instead of recording only the fix. Useful categories include scheduling capacity, configuration drift, release regression, dependency availability, storage behavior, network policy, and observability gaps. This makes patterns easier to find during reliability reviews.

When to revisit

Keep this Kubernetes troubleshooting guide on the operational review list whenever the cluster version, container runtime, ingress implementation, CNI, CSI driver, policy model, or observability stack changes. Commands and object behavior can vary with platform integrations, and diagnostic workflows should match the tools your team actually supports.

Revisit the guide after a significant incident, a recurring deployment failure, or a change to readiness and startup probes. Test the examples in a non-production namespace, confirm that event and log access still works, and remove commands that no longer match your access controls. As a practical routine, schedule an annual review and an additional review after each major Kubernetes upgrade. During the next incident, begin with scope, events, description, logs, and verification—and update this reference with the first root cause that the existing workflow failed to reveal.

Related Topics

#Kubernetes#Containers#Troubleshooting#Cloud Native#kubectl
M

Midways Cloud Editorial Team

DevOps and Cloud-Native Editor

Senior editor and content strategist. Writing about technology, design, and the future of digital media. Follow along for deep dives into the industry's moving parts.