Volume 11 · Chapter 6 — Banking Production Support and Troubleshooting
Container and Kubernetes Troubleshooting
6.1 Introduction
Banks increasingly run workloads on containers and Kubernetes (EKS), which introduce their own common production problems - pods that won’t start, crash loops, scheduling failures, and deployment issues. Volume 4 covered Kubernetes objects; this chapter applies that knowledge to troubleshooting the container platform in production. Knowing the standard container failure modes and how to diagnose them is essential for supporting modern banking workloads and is a frequent practical interview topic for container-based roles.
6.2 Pods That Won’t Start
Symptom: a pod stays pending and never runs. The most common cause is insufficient cluster capacity - no node has enough resources (CPU/memory) to satisfy the pod’s requests - so it can’t be scheduled. Other causes include a node selector or affinity rule that no node satisfies, or an unavailable resource the pod needs (a volume, a config). Diagnosis: inspect the pod’s status and events, which state why it can’t be scheduled (for example “insufficient CPU”). Response: add cluster capacity (scale the node group, or use Fargate so capacity is provided automatically), adjust the pod’s resource requests if they’re unrealistically high, or fix the scheduling constraint. A pending pod is a scheduling problem - the events tell you exactly which resource or constraint is blocking placement.
flowchart TB
Pod{Pod problem?} -->|Pending| Sched[Insufficient capacity / constraint:\nscale nodes or Fargate;\nfix requests/affinity]
Pod -->|CrashLoopBackOff| Crash[App failing on startup or\nliveness probe: check logs & config]
Pod -->|Not getting traffic| Ready[Readiness failing or\nService label mismatch]
Pod -->|OOMKilled| Mem[Memory limit too low or leak:\nraise limit / fix leak]
Pod -->|Deploy errors| Dep[Bad readiness gating\nor image: fix probe / roll back] 6.3 Crash Loops
Symptom: a pod repeatedly starts and crashes (CrashLoopBackOff). Common causes: the application fails on startup (a bug, a missing configuration or secret it needs, an unreachable dependency it requires at boot), or a liveness probe that’s too aggressive is killing a healthy-but-slow application. Diagnosis: read the pod’s logs to see why the container is exiting - the error usually appears there - and check the probe configuration. Response: fix the startup problem (supply the missing config/secret, fix the bug, or make the app resilient to a not-yet-ready dependency), or tune the liveness probe so it doesn’t kill a slow-starting-but-healthy app. A crash loop is the container telling you it can’t run - the logs and the probe settings are where the answer is.
6.4 Pods Running but Not Serving
Symptom: pods are running but receive no traffic, or the service is unreachable. Common causes: the readiness probe is failing, so Kubernetes correctly withholds traffic from a pod that isn’t ready; or the Service’s label selector doesn’t match the pods, so it isn’t routing to them; or the pods are unhealthy in a way that fails health checks. Diagnosis: check whether the pods are passing their readiness probe and whether the Service is selecting them (label match). Response: fix the readiness probe or the underlying reason the app isn’t becoming ready, and correct any label mismatch between the Service and the pods. This is distinct from a crash loop - the pod runs but is deliberately kept out of rotation - and the readiness probe and Service selector are the two things to check.
6.5 Resource Limits and Deployment Failures
Two more common container issues. Memory limits: a pod killed with OOMKilled has hit its memory limit - either the limit is set too low for the workload or there’s a memory leak; raise the limit for genuine needs or fix the leak, and set requests/limits sensibly so scheduling and stability are correct. Deployment failures: a rolling update that causes errors or won’t complete usually means the new pods aren’t becoming ready - a missing or wrong readiness probe letting traffic hit not-ready pods, or the new version failing to start; the fix is a correct readiness probe (so the rollout gates properly) and, if the release is bad, rolling back to the previous version. As stressed in Volume 4, misconfigured probes are a leading cause of Kubernetes deployment problems, so probes are often the answer.
6.6 Banking Production Scenario
A bank’s platform team troubleshoots EKS issues by symptom. A pending pod’s events show insufficient CPU, so they scale the node group (or rely on Fargate). A CrashLoopBackOff pod’s logs reveal it can’t reach a required secret, so they fix the secret access. Pods running but getting no traffic turn out to be failing their readiness probe during warm-up, so they tune it. An OOMKilled pod had a memory limit set too low for peak load, so they raise it and investigate for a leak. A rolling update causing brief errors is traced to a missing readiness probe letting traffic hit not-ready pods, which they add - and roll back the bad release. Because the team maps each container symptom (pending, crash loop, not serving, OOM, deploy errors) to its standard diagnosis and fix, they resolve EKS incidents quickly.
6.7 Troubleshooting: Container Diagnosis Mistakes
Container troubleshooting stalls when symptoms aren’t mapped to causes. A pending pod treated as a mystery is usually just insufficient capacity - read the pod events, then scale nodes or use Fargate. A crash loop debugged without reading pod logs wastes time - the logs show why it’s exiting. Pods running but not serving, misdiagnosed as crashed, are actually failing readiness or unmatched by the Service - check the probe and label selector. OOMKilled pods treated only by restarting ignore the too-low limit or leak - fix the real cause. Deployment errors blamed on the app are often a missing readiness probe - add it and roll back if needed. The discipline is to read pod status, events, and logs first (they usually state the cause), map the symptom to its standard pattern - pending is scheduling/capacity, crash loop is startup/probe, not-serving is readiness/selector, OOM is memory - and apply the known fix, rather than guessing at the container platform.
How do you troubleshoot common Kubernetes pod problems in production?
I troubleshoot Kubernetes pod problems by mapping the symptom to its standard cause, reading the pod’s status, events, and logs first because they usually state the reason. The first common problem is a pod stuck pending and never running, which is a scheduling problem - most often insufficient cluster capacity, where no node has enough CPU or memory to satisfy the pod’s requests, or a node selector or affinity rule that no node satisfies, or an unavailable resource like a volume. I inspect the pod’s events, which say exactly why it can’t be scheduled (for example “insufficient CPU”), and I respond by adding cluster capacity - scaling the node group or using Fargate so capacity is provided automatically - adjusting unrealistically high resource requests, or fixing the scheduling constraint. The second is a crash loop, CrashLoopBackOff, where a pod repeatedly starts and crashes - usually the application failing on startup because of a bug, a missing configuration or secret it needs, or a required dependency it can’t reach at boot, or a too-aggressive liveness probe killing a healthy-but-slow app. I read the pod’s logs to see why the container is exiting - the error is usually there - and check the probe, then fix the startup problem (supply the missing config or secret, fix the bug, make the app tolerate a not-yet-ready dependency) or tune the liveness probe. The third is pods running but not serving traffic, which is distinct from crashing: the pod runs but is kept out of rotation, usually because the readiness probe is failing so Kubernetes correctly withholds traffic, or the Service’s label selector doesn’t match the pods so it isn’t routing to them. I check whether pods pass their readiness probe and whether the Service selects them, and fix the probe (or the reason the app isn’t ready) or the label mismatch. The fourth is OOMKilled - a pod hitting its memory limit, meaning the limit is too low for the workload or there’s a memory leak - so I raise the limit for genuine needs or fix the leak and set requests and limits sensibly. And deployment failures during a rolling update, where new pods don’t become ready and cause errors or a stalled rollout, are usually a missing or wrong readiness probe letting traffic hit not-ready pods, or the new version failing to start; the fix is a correct readiness probe so the rollout gates properly, and rolling back if the release is bad. The recurring theme is that misconfigured probes - especially readiness - are a leading cause of Kubernetes deployment and serving problems, so probes are often the answer. So I map each symptom to its pattern - pending is capacity/scheduling, crash loop is startup/liveness, not-serving is readiness/selector, OOMKilled is memory, deploy errors are readiness/image - read the pod events and logs which state the cause, and apply the standard fix, which resolves container incidents quickly instead of guessing at the platform.
Chapter Revision Notes
- Pending pod = scheduling/capacity problem: read pod events; scale nodes or use Fargate, fix requests or affinity.
- CrashLoopBackOff = app failing on startup (missing config/secret, bug, dependency) or aggressive liveness probe: read logs, fix startup or tune probe.
- Running but not serving = failing readiness probe or Service label-selector mismatch: fix the probe or the selector.
- OOMKilled = memory limit too low or a leak: raise the limit for real needs or fix the leak; set requests/limits sensibly.
- Deployment errors during rollout = usually a missing/wrong readiness probe letting traffic hit not-ready pods: fix the probe, roll back a bad release.