Pod Terminations & Kubernetes Node Evictions
Chaos & SRE Sprint β Day 3
Trigger ungraceful SIGKILL pod terminations via PodChaos, verify zero-downtime request balancing across surviving replicas, and confirm ReplicaSet self-healing.
In this lab playbook, you will execute an immediate gracePeriod: 0 pod termination onpolicy-pod-a using Chaos Mesh PodChaos, verify that surviving replicas (policy-pod-b, policy-pod-c) absorb 100% of inflight requests with zero 5xx errors, and assert automatic ReplicaSet replacement.
The official reference codebase for Day 3 is hosted in the repository. Clone the repository and navigate to day-3-pod-terminations to run the working solution.
git clone https://github.com/letstrnsfrm-ai/chaos-engineering-roadmap.git
cd chaos-engineering-roadmap/day-3-pod-terminationsInspect PodChaos SIGKILL Specification
Review the PodChaos manifest configured with gracePeriod: 0 to simulate a sudden kernel OOMKill or spot node termination.
apiVersion: chaos-mesh.org/v1alpha1
kind: PodChaos
metadata:
name: policy-engine-random-pod-kill
namespace: checkout-mesh
spec:
action: pod-kill
mode: one
selector:
namespaces:
- checkout-mesh
labelSelectors:
app: policy-engine
gracePeriod: 0Execute Pod Kill Drill & Verify Self-Healing
Run the pod eviction drill and confirm both zero 5xx errors during eviction and automatic restoration of the 3-replica pool.
npm run test:day3- Triggered ungraceful PodChaos pod-kill (gracePeriod: 0) against an active service replica.
- Confirmed surviving replicas handled 100% of concurrent requests without HTTP 5xx errors.
- Verified ReplicaSet controller self-healing restored the replica count back to 3.
π§ Knowledge Check
Which Kubernetes resource prevents voluntary node drains from evicting all replicas of a critical stateless service simultaneously?