Stage 4, Part 3 of 9 · p. 31, Workloads & Lifecycle Deep Dive
PART 3: PRODUCTION FAILURE MODES
17. Top 10 Workload Failures
| # | Failure | Symptom | Root Cause | Fix |
| 1 | CrashLoopBackOff | Pod keeps restarting | App crashes | Check logs, fix app |
| 2 | ImagePullBackOff | Can't pull image | Bad tag, auth | Fix image or secrets |
| 3 | OOMKilled | Exit 137 | Memory limit exceeded | Increase limit, fix leak |
| 4 | Readiness probe fails | Pod never Ready | Probe or app issue | Fix probe or app |
| 5 | PDB blocking drain | Can't drain node | PDB too strict | Adjust PDB |
| 6 | StatefulSet stuck | Pods won't start in order | Pod 0 unhealthy | Fix Pod 0 |
| 7 | Job never completes | Job stuck running | Non-idempotent job, hook failure | Fix job logic |
| 8 | PreStop hangs | Pod takes forever to terminate | PreStop script bug | Fix preStop |
| 9 | Slow rollout | Update takes hours | maxUnavailable too low, probes too strict | Tune rollout |
| 10 | Native sidecar incompatibility | Pod fails to start | K8s < 1.29 | Upgrade K8s or use traditional sidecar |
18. Workload Debugging Runbook
"Workload is Broken" — Step-by-Step
text
STEP 1: Check the workload status
$ kubectl get deployment/<name>
$ kubectl get statefulset/<name>
$ kubectl get pods -l app=<name>
STEP 2: Check the Pod
$ kubectl describe pod <pod>
# Look at Status, Events, Container States
STEP 3: Check logs
$ kubectl logs <pod>
$ kubectl logs <pod> --previous # If crashed
$ kubectl logs <pod> -c <container> # Multi-container
STEP 4: Categorize the issue
Pending → Scheduling issue
- Check node resources
- Check taints/tolerations
- Check PVC status
- Check PDB
ImagePullBackOff → Image issue
- Check image name/tag
- Check imagePullSecrets
- Check registry connectivity
CrashLoopBackOff → App issue
- Check logs --previous
- Check exit code
- Check env vars, ConfigMaps, Secrets
Running but not Ready → Probe issue
- Check probe endpoint
- Check describe pod for probe failures
- Test probe manually
Terminating (stuck) → Termination issue
- Check preStop hook
- Check terminationGracePeriodSeconds
- Check app SIGTERM handling
STEP 5: Check resource limits
$ kubectl top pod <pod>
$ kubectl describe pod <pod> | grep -A5 Resources
STEP 6: Check PDB
$ kubectl get pdb
$ kubectl describe pdb <name>
STEP 7: Check StatefulSet-specific issues
$ kubectl get pvc -l app=<name>
$ kubectl get pv
STEP 8: Deep debugging
$ kubectl debug -it <pod> --image=busybox --target=<container>
STEP 9: Escalate
19. Blast Radius Analysis
What Happens When Workloads Fail?
| Component | Impact | Severity |
| All replicas crash | Service down | SEV-1 |
| One replica crash | Degraded capacity | SEV-2 |
| StatefulSet Pod 0 down | Cluster unavailable | SEV-1 |
| PDB blocks drain | Can't upgrade cluster | SEV-2 |
| Job fails | Batch incomplete | SEV-3 |
| CronJob fails | Missed schedule | SEV-3 |
| Probe misconfiguration | Traffic to bad pods | SEV-2 |
Mitigation Strategies
| Strategy | Implementation |
| Multiple replicas | 3+ for production |
| Pod anti-affinity | Spread across nodes/AZs |
| Readiness probes | No traffic to bad pods |
| PodDisruptionBudgets | Protect during disruptions |
| Graceful shutdown | No dropped requests |
| Resource limits | Predictable behavior |
1:1 copy of the class Google Doc, code in code blocks.