CKA Day 37 — Application Failure Troubleshooting
Day 37 of the 40-day Certified Kubernetes Administrator course by Tech Tutorials with Piyush. This session dives into application-level failures — the most common and most tested category in the Troubleshooting domain (~30% of the CKA exam).
Key Concepts Covered
The Application Failure Debugging Chain
Day 37 formalizes a systematic approach to diagnosing why an application is failing in Kubernetes. The video emphasizes that random guessing wastes exam time; instead, follow a structured chain:
kubectl get pods -o wide ← Check status, restarts, node
kubectl describe pod <name> ← Read Events (the most important section)
kubectl logs <name> --previous ← Check crash output
kubectl logs <name> -c <container> ← Multi-container target
kubectl exec -it <name> -- sh ← Interactive debugging inside the Pod
kubectl get events --sort-by='.lastTimestamp' ← Cluster-level event stream
CKA Insight:
kubectl describe podEvents are ordered chronologically and often contain the exact error message. Most application failures are solved by reading Events carefully.
Common Application Failure Patterns
The video catalogs the failure modes that appear repeatedly on the CKA exam:
| Symptom | Likely Cause | Where to Look |
|---|---|---|
ImagePullBackOff | Wrong image name, missing tag, or private registry without imagePullSecrets | kubectl describe pod → Events |
CrashLoopBackOff | App crashes on start; bad command/args, missing env, or liveness probe too aggressive | kubectl logs --previous, then kubectl describe |
Error / Init:Error | Init container exits non-zero | kubectl logs <pod> -c <init-container> |
Pod stuck Pending | Insufficient resources, taint mismatch, or missing PVC | kubectl describe pod → Events |
OOMKilled | Memory limit exceeded | kubectl describe pod → Last State, kubectl top pod |
ContainerCannotRun | Volume mount path wrong, or ConfigMap/Secret missing | kubectl describe pod → Events |
| Service 502/timeout | Readiness probe failing, or backend Pods not ready | kubectl get endpoints, kubectl describe pod |
| Rolling update stuck | New Pods never become ready | kubectl rollout status deployment/<name> |
Image Pull Failures (ImagePullBackOff)
When Kubernetes cannot pull the container image, the Pod enters ImagePullBackOff. The kubelet retries with exponential backoff. Causes:
- Typo in image name or tag — most common; verify with
kubectl get pod <name> -o yaml | grep image: - Private registry without credentials — the Pod’s ServiceAccount needs
imagePullSecretsreferencing akubernetes.io/dockerconfigjsonSecret - Registry is down or unreachable — network or DNS issue
Fix speed pattern:
kubectl set image deployment/<name> <container>=<correct-image>:<tag>
Crash Loops (CrashLoopBackOff)
A container that repeatedly crashes and restarts is the hallmark of CrashLoopBackOff. The restart count climbs in kubectl get pod:
- Missing environment variables — app expects
DATABASE_URLbut none is defined - Bad startup command or args —
command/argsoverride in the Pod spec conflicts with the image’s ENTRYPOINT - Missing ConfigMap or Secret — volume mount references a non-existent object
- Liveness probe too aggressive — container killed before it finishes initializing
- Resource limit too low — container OOMKilled immediately on startup
Service Connectivity Failures
Even when Pods are Running, traffic may not reach them. The video covers the Service-to-Pod routing chain:
- Check the Service selector —
kubectl get svc <name> -o yaml | grep selectormust match Pod labels - Check Endpoints —
kubectl get endpoints <svc>shows which Pod IPs are registered - Check readiness — only ready Pods appear in Endpoints;
kubectl describe podfor readiness probe status - Check port mapping —
port(Service) →targetPort(container) must be correct - Check NetworkPolicy — if policies exist, ensure the Service’s Pods are allowed ingress from the client
Deployment and Rollout Failures
A Deployment rollout can stall when new Pods fail to become ready:
- MaxUnavailable / MaxSurge — if
maxUnavailableis 0 and new Pods can’t start, the rollout hangs - Readiness probe never passes — new Pods stay
NotReady, so old Pods are never terminated - Resource quota exhausted — Namespace
ResourceQuotablocks new Pod creation
Commands to diagnose:
kubectl rollout status deployment/<name>
kubectl rollout history deployment/<name>
kubectl rollout undo deployment/<name> # Roll back to previous revisionEvents as the Source of Truth
kubectl get events provides a cluster-wide chronological stream of everything that happened. This is invaluable when:
- The Pod was deleted and recreated by a controller — events show the controller action
- A node went
NotReadyand evicted Pods — events show the eviction reason - A volume failed to mount — events show the mount error from kubelet
# All events sorted by time
kubectl get events --sort-by='.lastTimestamp'
# Events for a specific object
kubectl get events --field-selector involvedObject.name=<pod-name>
# Warning events only (the failures)
kubectl get events --field-selector type=WarningSynthesis
Day 37 is the practical culmination of the Troubleshooting domain. It takes the individual tools taught across the course — kubectl get, describe, logs, exec, top, rollout commands — and teaches how to combine them into a systematic debugging workflow. The video emphasizes that the CKA exam does not test esoteric failures; it tests the ability to methodically inspect the obvious: wrong image names, missing env vars, bad selectors, crashed containers, and readiness probe failures.
The golden rule for the exam: Events first. Before diving into logs or exec-ing into containers, read kubectl describe Events. They contain the human-readable explanation of why Kubernetes is failing to run the workload.
See Also
Wiki Concepts
- Kubernetes Application Troubleshooting — synthesized concept page with the full troubleshooting matrix and systematic debugging workflow
- Kubernetes Logging and Monitoring — Day 36:
kubectl logsand Metrics Server as troubleshooting prerequisites - Kubernetes Health Probes — probe misconfiguration is a leading cause of app failures
- Pod Fundamentals — the unit where application failures manifest
- Deployment, ReplicaSet & Replication Controller — rollout failures and self-healing behavior
- Kubernetes Services — selector mismatches and Endpoint diagnostics
- Kubernetes ConfigMaps and Secrets — missing config objects cause startup crashes
- Kubernetes Resource Requests and Limits — OOMKilled and Pending resource failures
- Kubernetes Network Policies — traffic blocked by policies appears as a service failure
- Multi-Container Pods —
kubectl logs -cand init container failures - Kubernetes Architecture — control plane components that emit events
- CKA Certification — exam domain mapping
Related Sources
- CKA Day 36 — Kubernetes Logging and Monitoring — preceding day: logs and metrics as troubleshooting tools
- CKA Day 18 — Kubernetes Health Probes Explained — probes and their role in rollout failures
- CKA Day 8 — Deployments, ReplicaSets & Replication Controllers — rollout mechanics
- CKA Day 9 — Kubernetes Services Explained — Service selectors and Endpoints
Related Sources
- CKA Day 38 — Troubleshooting Control Plane Failure — Next day in the series: control plane component failure diagnosis
Creator / Entity
- Tech Tutorials with Piyush — CKA course creator