#18 12 pages
SRE & Debugging Reference
Runbooks, debugging scenarios, and SRE concepts for Kubernetes, Linux, and AWS.
Index
| File | Topics |
|---|---|
| k8s-debugging.md | 5XX debugging (K8s + EKS), OOM-Killed recovery, pod state quick reference |
| k8s-scenarios.md | CrashLoopBackOff, Pending, all-replicas-on-one-node outage, ImagePullBackOff, Terminating, NotReady, High Latency, PVC, Quota, DNS, NetworkPolicy, HPA, rollout stuck, webhooks, disk pressure, etcd slow, RBAC 403 |
| linux-debugging.md | High CPU, I/O wait, zombies, FD exhaustion, TIME_WAIT, disk I/O, inodes, NFS, OOM killer, kernel panic |
| aws-scenarios.md | EC2 SSH timeout, Lambda timeout, ALB 502, S3 denied, RDS refused, ECS restart, CF stuck, API GW 429, EKS nodes not joining, high bill |
| gcp-scenarios.md | GKE Node NotReady, Cloud SQL Connection Refused, Pub/Sub backlog, Cloud Run 503, Artifact Registry auth failure, GKE Ingress 502, Spanner high latency |
| cicd-scenarios.md | GHA OIDC auth, job hangs, ArgoCD out-of-sync, ArgoCD ImagePull, Jenkins Docker, wrong env deploy, staging crash, flaky tests |
| iac-scenarios.md | terraform resource exists, unexpected destroy, state lock, drift, module conflict, sensitive values, Helm timeout, CF ROLLBACK_COMPLETE |
| sre-concepts.md | SLOs, SLAs, error budgets, MTTD/MTTR, incident management lifecycle, blameless postmortem template, on-call best practices |
| self-healing-aiops.md | Argo Events + Argo Workflows remediation loop, top 5 auto-remediation scenarios, AIOps LLM agent (LangChain + Loki + runbook RAG), human approval gate |
| db-monitoring.md | Prometheus + Grafana for PostgreSQL, MySQL, Redis, MongoDB on-prem |
| scenarios-scheduling-scaling.md | Pod Pending (label+CPU), rolling update surge/unavailable math, orphaned Pending pod after a 2nd fix (why maxSurge/maxUnavailable don't help + progressDeadlineSeconds fix), /var/log ENOSPC with free space (inodes/deleted-FDs/reserved blocks), ASG predictive scaling + warm pools, unpredictable burst scaling, ALB/NLB LCU pre-warming, HPA/rollout/CA ceiling-floor math |
K8s Debugging — Quick Triage
pod not Running?
Pending → kubectl describe pod → FailedScheduling events
CrashLoopBackOff → kubectl logs --previous + exit code
ImagePullBackOff → kubectl describe pod → registry/auth/tag
Terminating → kubectl get pod -o json | jq .metadata.finalizers
pod Running but broken?
Requests failing → kubectl exec -- curl localhost:PORT, check logs
DNS failing → kubectl exec -- nslookup my-svc
Can't reach pod → check NetworkPolicy, check Service endpoints
High latency → kubectl top pod, check CPU throttling
node issues?
NotReady → kubectl describe node → Conditions + Events
Disk pressure → kubectl debug node, df -h on node
etcd slow → etcdctl endpoint health, etcdctl defrag
Linux Debugging — Quick Triage
high load?
CPU high + nothing in top → perf top (kernel threads / softirq / steal)
CPU idle + high load → iostat -x (iowait), iotop (culprit process)
process issues?
zombies → ps -eo pid,ppid,stat | awk '$3~/Z/' → kill parent
disappeared → dmesg | grep -i oom (OOM killer)
fd exhaustion → lsof -p PID | wc -l, ulimit -n
disk issues?
no space (df fine) → df -i (inodes exhausted)
slow writes → iostat -x (await > 100ms), iotop
nfs hang → umount -l, check server reachability
crashes?
unexpected reboot → journalctl -b -1 | tail -50
kernel panic → dmesg | grep -i panic, /var/crash/vmcore
Pages in this section
SRE: Debugging & Recovery
When your application starts returning 5XX errors, there is a systematic investigation order. Jumping straight to application logs often wastes time — start fro
Kubernetes Production Scenarios
Twenty-plus Kubernetes failure patterns pulled from real on-call rotations — the symptom, the diagnostic commands, the cause tree, and the prevention that stops
Scheduling, Rollout, Linux Storage, and ASG Scaling — Deep Dive Scenarios
Companion to k8s-scenarios.md, linux-debugging.md, and aws-scenarios.md. Covers: pod scheduling failures caused by label/selector + resource pressure, why old p
Linux Debugging Scenarios
Ten failure patterns you'll actually hit operating Linux hosts in production — the symptom, a diagnostic flowchart, the commands that confirm the cause, and the
AWS Debugging & Operational Scenarios
Ten failure patterns you'll actually hit running production workloads on AWS — the symptom, a diagnostic flowchart, the commands that confirm the cause, and the
GCP Incident Scenarios
GCP-specific debugging playbooks — the same format as aws-scenarios.md but tuned for GKE, Cloud SQL, Pub/Sub, Cloud Run, Artifact Registry, and Spanner.
CI/CD Debugging Scenarios
Practical debugging playbooks for GitHub Actions, ArgoCD, and Jenkins.
IaC Debugging Scenarios
Terraform, Helm, and CloudFormation failure patterns with diagnosis flowcharts and concrete commands.
Leader Election for Singleton Workloads
If you need exactly one active instance (not zero, not two), use Kubernetes Lease-based leader election. The Lease API is a lightweight lock stored in etcd.
On-Call Tooling
PagerDuty/Opsgenie configuration, Alertmanager integration, alert fatigue metrics, schedule design, and incident-command/ChatOps wiring. Complements alerting-ph
Self-Healing Infrastructure & AIOps
Two converging ideas: automated remediation (SRE runbooks that run themselves) and AIOps (AI agents that diagnose and act on incidents). Both follow the same lo
Database Monitoring: On-Prem (K8s & EC2)
Prometheus + Grafana stack for MySQL, PostgreSQL, Redis, MongoDB running on-prem or EC2/self-managed K8s.