A Practical Beginner-to-Advanced Guide for Building Self-Healing, Fault-Tolerant Systems
Chapter 1: Why Applications Fail in Kubernetes
- A Day Without Probes: How Silent Failures Destroy Trust
- The Three Faces of Health: Alive, Ready, Starting
- Self-Healing as a Design Choice, Not a Default Guarantee
- What This Book Will Teach You and How to Use It
Chapter 2: Foundations of Application Health and Failure Detection
- Defining Health Versus Availability Versus Reliability
- The Taxonomy of Failures: Transient, Permanent, Cascading, Silent
- Why Traditional Uptime Monitoring Fails in Kubernetes
- The Feedback Loop: Detection, Reaction, Recovery
Chapter 3: Kubernetes Workload Lifecycle and the Role of Probes
- The Pod Lifecycle: From Pending to Terminated
- Container States and Conditions Explained
- How Kubelet Watches, Probes and Restarts Containers
- Where Probes Fit in the Control Plane Architecture
Chapter 4: Liveness, Readiness and Startup Probes: The Complete Picture
- Liveness Probes: Detecting Deadlocks and Silent Deaths
- Readiness Probes: Controlling Traffic with Surgical Precision
- Startup Probes: Saving Slow-Starting Applications from Premature Death
- How Probes Interact and Why You Usually Need More Than One
Chapter 5: Implementing Health Check Endpoints: HTTP, TCP, gRPC and Exec
- Designing HTTP Health Endpoints That Actually Tell the Truth
- TCP Socket Checks: When Connectivity Is Enough
- gRPC Health Checking Protocol and Implementation
- Exec Probes: Running Diagnostics Inside Containers
- The Dependency Trap: What Your Health Check Should Never Do
Chapter 6: Tuning Probe Configuration for Real Workloads
- initialDelaySeconds: Surviving the Startup Window
- periodSeconds and timeoutSeconds: Balancing Detection Speed Against Overhead
- successThreshold and failureThreshold: Preventing Flapping Without Delaying Recovery
- Configuration Matrix for Different Workload Types
- The Math Behind Your Thresholds: A Practical Framework
Chapter 7: Container Startup, Shutdown and Graceful Traffic Management
- The Startup Sequence: Image Pull Through First Request
- preStop Hooks: Coordinating Cleanup Before Traffic Stops
- Connection Draining and Graceful Shutdown Patterns
- TerminationGracePeriodSeconds: Choosing the Right Timeout
- The Death Spiral: What Happens When Shutdown Fails
Chapter 8: Services, Endpoints and Traffic Routing Decisions
- How Readiness Controls Service Endpoint Membership
- The Endpoint Controller: From Pod Conditions to Load Balancer Entries
- Ingress Controllers and External Load Balancers
- Readiness Gates: Adding Custom Health Requirements
- When Unhealthy Pods Still Receive Traffic: Common Failure Modes
Chapter 9: Deployments, Rolling Updates and Failure Recovery
- Rolling Updates: How Probes Gate Each Step
- When Rollouts Hang: Diagnosing Probe-Related Deployment Failures
- Rollback Triggers and Automated Recovery
- MaxSurge and MaxUnavailable: Tuning for Safety Versus Speed
- Jobs, CronJobs and Stateless Versus Stateful Update Strategies
Chapter 10: Stateful Workloads, Databases and Clustered Systems
- Why Stateful Sets Need Different Probe Strategies
- Database Health Checks: Replication Lag, Connection Pools, and Corruption Detection
- Leader Election and Cluster Membership Monitoring
- Startup Probes for Slow-Initializing Databases
- Backup, Restore and Recovery Integration with Health Checks
Chapter 11: Cascading Failures, Retry Storms and Circuit Breakers
- Anatomy of a Cascade: How One Failure Becomes Many
- Retry Storms and Amplification Loops
- Circuit Breakers: When to Stop Trying
- Backpressure, Load Shedding, and Rate Limiting
- Separating Infrastructure Health from Application Dependencies
Chapter 12: Resource Pressure, Evictions and Node-Level Reliability
- CPU Throttling: When Your Probe Times Out Because the Container Is Starved
- Memory Pressure, OOM Kills, and Eviction Order
- Node Failures, Taints and Pod Evictions
- PodDisruptionBudgets: Protecting Availability During Maintenance
- Resource Requests, Limits and QoS Classes Explained
Chapter 13: Observability for Health and Reliability Engineering
- Monitoring Probe Metrics with Prometheus and kube-state-metrics
- Building Dashboards That Tell You What Matters
- Alerting on Health Degradation Without Alert Fatigue
- SLOs, SLIs and Error Budgets for Reliability Goals
- Incident Investigation: A Systematic Approach to Outage Diagnosis
Chapter 14: Production Hardening and Operational Readiness
- Securing Health Endpoints: Authentication, Authorization and Exposure
- Network Policies and Least Privilege for Health Checks
- Chaos Engineering and Failure Injection Testing
- Capacity Planning and Performance Testing with Realistic Loads
- The Operational Readiness Checklist Before Going Live
Chapter 15: Conclusion: Building Durable Reliability at Scale
- The Reliability Checklist: A Final Walkthrough
- Common Patterns That Work Across Environments
- What Is Coming Next in Kubernetes Reliability
- Your Next Steps: Implementing Change Safely