Kubernetes Troubleshooting Guide: Diagnose Pods, Services, Ingress, and Resource Failures
Kubernetescontainerskubectltroubleshootingcluster operations

Kubernetes Troubleshooting Guide: Diagnose Pods, Services, Ingress, and Resource Failures

BBinaries.live Editorial Team
2026-11-29
7 min read

A reusable Kubernetes troubleshooting checklist for pods, services, ingress, probes, scheduling, image pulls, and resource failures.

Kubernetes failures are easier to resolve when you separate symptoms from causes. This troubleshooting guide provides a reusable workflow for inspecting pods, workloads, services, ingress, scheduling, probes, and resource pressure with focused kubectl commands, followed by a practical escalation checklist.

Overview

Start with the smallest useful scope: identify the namespace, workload, affected pod, and time the failure began. Avoid changing manifests immediately. First collect evidence from the Kubernetes API, container logs, events, and the deployment configuration.

Useful commands for an initial check include:

kubectl config current-context
kubectl get pods -A
kubectl get events -n <namespace> --sort-by=.lastTimestamp
kubectl get deploy,rs,svc,ingress -n <namespace>
kubectl describe pod <pod-name> -n <namespace>

Use the correct namespace on every command. A healthy pod in one namespace does not prove that the production workload is healthy. In shared clusters, also confirm that your current context points to the intended cluster before inspecting or changing resources.

A useful diagnostic sequence is:

  1. Confirm the cluster and namespace.
  2. Inspect workload status and recent rollout history.
  3. Inspect the affected pod's state, events, and logs.
  4. Verify scheduling, image access, probes, and resource requests.
  5. Trace traffic from ingress to service to endpoints and pod.
  6. Apply the smallest reversible change, then verify recovery.

Checklist by scenario

SymptomCheck firstUseful commands
CrashLoopBackOffContainer exit reason, current and previous logs, configuration, and probes.kubectl logs <pod> -n <ns> -c <container>
kubectl logs <pod> -n <ns> -c <container> --previous
kubectl describe pod <pod> -n <ns>
ImagePullBackOff or ErrImagePullImage name and tag, registry reachability, image pull secret, and node permissions.kubectl describe pod <pod> -n <ns>
kubectl get secret -n <ns>
Pod stuck in PendingScheduler events, node capacity, taints, tolerations, affinity, and PVC binding.kubectl describe pod <pod> -n <ns>
kubectl get nodes
kubectl get pvc -n <ns>
Probe failuresProbe path, port, scheme, delay, timeout, and application startup time.kubectl describe pod <pod> -n <ns>
kubectl port-forward pod/<pod> 8080:<port> -n <ns>
Service returns no responseService selector, named ports, endpoints, readiness, and network policy.kubectl get svc <service> -n <ns> -o yaml
kubectl get endpointslice -n <ns> -l kubernetes.io/service-name=<service>
Ingress returns 404 or TLS errorIngress class, host, path, backend service, certificate secret, and controller events.kubectl describe ingress <name> -n <ns>
kubectl get ingressclass
kubectl logs -n <controller-namespace> deploy/<controller>
CPU or memory pressureRequests, limits, actual usage, evictions, node conditions, and recent rollout changes.kubectl top pod -n <ns>
kubectl top node
kubectl describe node <node>

CrashLoopBackOff and failed containers

CrashLoopBackOff describes repeated restarts with a backoff; it is not the underlying cause. Read the previous container's logs when the current container has already restarted. Then inspect the termination reason and exit code in kubectl describe pod. Common causes include a missing environment variable, an invalid command, an unavailable dependency, a permission problem, or an application that starts more slowly than its probe allows.

Compare the live pod with its owning Deployment:

kubectl get deployment <deployment> -n <ns> -o yaml
kubectl rollout history deployment/<deployment> -n <ns>
kubectl get rs -n <ns>

If a recent rollout introduced the failure, pause further changes and use your release process to roll back only after confirming the previous revision is appropriate. A rollback may restore service while the image, configuration, or probe defect is investigated.

ImagePullBackOff

Read the pod events for the exact registry response. Check for a typo in the repository or tag, an image that is not present, a private registry requiring credentials, or a node that cannot reach the registry. Verify that the referenced pull secret exists in the same namespace and is attached through the pod specification or service account. Do not treat a successful image pull on one node as proof that every node has identical network access or credentials.

Pending pods and scheduling failures

The scheduler normally explains a pending pod in its events. Look for insufficient CPU or memory, node selectors that match no nodes, untolerated taints, required affinity rules, or an unbound persistent volume claim. Compare the pod's requests with allocatable node capacity; limits alone do not determine scheduling. For resource-sizing context, see the Kubernetes resource requests and limits guide.

Services, endpoints, and ingress

A Service can exist while routing to zero ready endpoints. Compare its selector with pod labels, confirm that the target port matches the container's listening port, and inspect EndpointSlices. Test from inside the cluster when possible rather than relying only on an external browser.

kubectl run netcheck --rm -it --image=curlimages/curl -- sh
curl -v http://<service>.<namespace>.svc.cluster.local:<port>

For ingress, inspect the resource and the ingress controller separately. Confirm that the request host matches the rule, the path behaves as expected, the selected IngressClass is installed, and the TLS secret is in the ingress resource's namespace. Controller-specific annotations and log locations vary, so use the controller's documented configuration rather than assuming annotations are portable. See the dedicated Kubernetes ingress troubleshooting guide for a deeper routing checklist.

What to double-check

  • Context and namespace: Run kubectl config current-context and explicitly provide -n for namespaced resources.
  • Ownership: Identify whether a Deployment, StatefulSet, Job, or another controller will overwrite a manual pod change.
  • Rollout state: Check available, ready, updated, and unavailable replicas instead of looking only at pod color or phase.
  • Events: Events are time-sensitive operational evidence. Capture them early and include timestamps when escalating.
  • Readiness versus liveness: Readiness controls traffic eligibility; liveness restarts a container. Fixing a liveness probe can hide an application failure rather than solve it.
  • Resource units: Review CPU and memory requests and limits carefully. Memory pressure can lead to eviction or an out-of-memory termination, while high CPU may produce throttling without a restart.
  • Version and controller differences: Confirm the Kubernetes version, API versions used by manifests, and ingress-controller implementation before applying examples from another cluster.
  • Recent changes: Compare image digests or tags, ConfigMaps, Secrets, service selectors, network policies, and node changes with the last known-good revision.

Common mistakes

Restarting a pod repeatedly can erase useful evidence and may increase load on a failing dependency. Capture logs and events first. Editing a live pod is also usually temporary because its controller may replace it; make durable changes in the Deployment, Helm values, Kustomize overlay, or other declared source of truth.

Another frequent mistake is testing only from outside the cluster. External failure may come from DNS, a load balancer, TLS termination, ingress rules, or a Service, while internal failure may indicate application or network-policy issues. Test each hop independently.

Do not broaden permissions, disable probes, or remove resource limits as a first response. Those actions can reduce immediate friction while creating a larger reliability or security problem. If a mitigation is necessary, record its scope, owner, rollback step, and expiry in the incident notes.

For security-related image, dependency, or infrastructure findings, connect the diagnosis to a controlled delivery process using the DevSecOps pipeline checklist. For releases, document whether the incident suggests a safer blue-green or canary strategy using the deployment strategy comparison.

When to revisit

Revisit this checklist before a cluster upgrade, ingress-controller change, registry migration, major workload launch, or seasonal capacity review. Kubernetes API behavior, controller configuration, admission policies, and observability integrations can change between versions, so validate command output and manifest examples against the cluster you operate.

After an incident, turn the investigation into a short runbook update. Record the symptom, exact commands, relevant events, confirmed cause, safe mitigation, and verification step. Add a dashboard or alert only when it helps someone detect or diagnose the failure earlier; the Prometheus alert design guide can help keep alerts actionable.

Printable escalation checklist

  • Record cluster context, namespace, workload, affected pod, and incident start time.
  • Capture pod status, description, current logs, previous logs, and sorted events.
  • Capture the owning workload, rollout history, image reference, and recent configuration changes.
  • For traffic failures, capture Service selectors, EndpointSlices, Ingress details, DNS results, and controller logs.
  • For scheduling or pressure failures, capture node conditions, requests, limits, usage, taints, and PVC status.
  • State the confirmed cause separately from assumptions and list the next reversible action.
  • After mitigation, verify readiness, error rate, logs, traffic flow, and replica stability.
  • Assign an owner and review date for any temporary change or follow-up investigation.

The goal is not to memorize every kubectl flag. It is to collect the right evidence in a consistent order, reduce risky guesswork, and leave the next responder with a clearer path than the one you found.

Related Topics

#Kubernetes#containers#kubectl#troubleshooting#cluster operations
B

Binaries.live Editorial Team

DevOps Editorial Team

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.