Skip to main content
In previous lessons you’ve practiced targeted troubleshooting techniques. This article consolidates those techniques into a concise, repeatable workflow for diagnosing application failures in Kubernetes. Follow the checklist below to quickly isolate whether the problem is at the user-facing frontend, the service layer, the backing pods, or the datastore. Start by mapping your application topology. In this example we have a simple two‑tier app: a web frontend and a database backend. The DB pod hosts the database and is exposed to the web server via a DB Service. The web pod hosts the application and is exposed to users via a web Service.
Before you run commands, draw a small topology diagram showing how components connect (user → web Service → web Pod → DB Service → DB Pod). This reduces guesswork and helps decide whether to begin at the frontend or backend based on symptoms.
A small visual of the dependency chain looks like this:
A vertical service-dependency diagram titled "Checking Dependent Service" showing DB at the bottom, DB-Service, WEB, WEB-Service, and a user icon at the top connected by arrows. The graphic uses colored shapes (circles and triangles) to represent each component.

Troubleshooting checklist (ordered)

Work through these steps until you find the root cause. Start at the user-facing end if users report the application is inaccessible.

1) Test the user-facing endpoint

  • From outside the cluster test Node IP + NodePort (NodePort Service) or an external load balancer URL:
  • From inside the cluster, curl the Service ClusterIP or Service DNS name:
Example curl failure:
If this fails, note the error (timeout, connection refused, 5xx, etc.) and proceed to Service checks.

2) Inspect the Service

  • Confirm the Service has endpoints (that it discovered pods matching its selector):
Example output snippet:
  • If Endpoints: is empty, verify the Service selector exactly matches the Pod labels. A label-selector mismatch is a common cause of missing endpoints.

3) Check the backing Pod(s)

  • Ensure the pod is Running and not repeatedly restarting. Use:
  • Look for CrashLoopBackOff, restart counts, and recent events in kubectl describe.
  • Example Pod manifest for reference:

4) Read application logs

  • Use kubectl logs to examine container output:
    • Follow logs in real time:
    • View logs from the previous crashed instance:
    • For multi-container pods:
Example application logs:
Logs often reveal configuration errors, missing dependencies, or port mismatches.

5) Move to the database layer (if web layer looks healthy)

  • Repeat the Service → Pod → Logs checks for the DB Service and DB Pod.
  • Look for messages indicating the DB cannot accept connections (authentication errors, missing schema migrations, out-of-memory kills, etc.).

6) Use describe for deeper diagnostics

  • kubectl describe surfaces pod events, image pull errors, failed probes, and other useful messages:

Quick command reference

Common pitfalls: Service selectors that don’t match pod labels, container ports misconfigured relative to Service targetPort, NetworkPolicies or firewall rules blocking traffic, and kube-proxy issues. Confirm labels, ports, and network rules before assuming application-level failures.

Additional diagnostic tips

  • If Services report endpoints but traffic still fails, check:
    • NetworkPolicies (restricting Pod-to-Pod traffic),
    • Node firewall rules and security groups,
    • kube-proxy status and mode on nodes.
  • To verify connectivity from within the cluster, create a temporary debug pod (busybox, curl images) and exec into it to curl Service IPs and pod IPs.
  • For troubleshooting liveness/readiness probe failures, inspect probe definitions in the Pod spec and pod events for probe failure messages.
These steps form a concise, repeatable workflow to identify where in the stack an application failure originates. Use the diagram and checklist to guide whether to begin at the frontend or backend, and iterate until you find the root cause.

Watch Video

Practice Lab