Failure Injection Patterns in Kubernetes

Failure Injection Patterns in Kubernetes

A plain-English guide to breaking your cluster on purpose, safely: which failures to inject, how to keep the blast radius small, how to measure what happens, and how to turn every lesson into a stronger system.

Imagine a lifeguard who has never practiced a rescue. The pool is calm, the shifts are quiet, and everyone assumes the lifeguard would know exactly what to do if someone were drowning. Nobody really knows, because it has never been tried. Smart pools run rescue drills on ordinary afternoons, with a volunteer pretending to struggle, so that the real moment is not the first time. A Kubernetes cluster is the pool, your applications are the swimmers, and failure injection is the rescue drill.

This guide teaches failure injection from the ground up. You do not need any experience with chaos engineering. Every new word is explained when it first appears and every big idea comes with an everyday comparison. We will walk through the principles, the layers where things fail, a long list of practical patterns for killing pods, nodes, networks, names, disks, dependencies and more, the safety rules that keep experiments from becoming outages, and the habits that turn a handful of tests into a lasting culture of resilience.

1Why Break Things on Purpose?

The only way to know your system survives a failure is to watch it survive one, ideally on a day you chose.

Every system fails eventually. Disks fill up, networks drop packets, machines vanish, and programs crash at the worst moment. Kubernetes was designed with this in mind. It restarts crashed containers, moves pods away from dead machines and spreads copies of your application across many nodes. But having these features is not the same as having a system that truly survives. A restart policy that has never been tested might not work the way you imagine. A backup service that has never been called might be pointed at a server that no longer exists.

Failure injection is the practice of causing small, controlled failures deliberately, so you can observe how your system reacts and fix weaknesses before real customers meet them. It is the heart of what the industry calls chaos engineering. The goal is not to cause damage. The goal is to replace hopeful guessing with real evidence.

Simple Analogy

A school holds fire drills even though real fires are rare. Nobody thinks the school wants a fire. The drill shows whether the alarm works, whether the doors open, and whether everyone knows where to go. Failure injection is a fire drill for your software, and it is far better to find a locked exit during a drill than during a fire.

Reason 1

Find weak spots early

Discover missing timeouts, bad retries and hidden single points of failure while the stakes are low.

Reason 2

Build confidence

Teams that have seen their system recover calmly deploy and operate with less fear.

Reason 3

Train people

Engineers practice diagnosing and fixing problems before the real pager rings at three in the morning.

Reason 4

Prove the claims

Show leaders and auditors that high availability promises are tested, not assumed.

i
Key Idea

Failure injection does not create weakness. It reveals weakness that was already there, at a time and place where you can handle it.

2The Core Principles of Chaos Engineering

Chaos engineering is a disciplined experiment, not random destruction.

The idea became famous when a large streaming company built a tool that randomly turned off servers in its production environment. The purpose was to force engineers to build services that did not depend on any single machine. Over time, the practice grew into a careful discipline with a few simple principles. Those principles are what separate chaos engineering from reckless breaking of things.

1

Start with a steady state

Define what normal looks like using measurable signals, such as the share of successful requests and the time they take.

2

Form a hypothesis

Predict that the steady state will continue even when a specific failure occurs, and write the prediction down.

3

Introduce real-world events

Inject failures that actually happen in practice, such as dead machines, slow networks and full disks.

4

Try to disprove the hypothesis

Look for a difference between the steady state and the state during the failure. Any difference is a lesson.

5

Limit the blast radius

Keep the experiment small enough that if you are wrong, the harm is tiny and quickly reversible.

Simple Analogy

A scientist testing whether a bridge design is safe does not drive a loaded truck onto the real bridge on the first day. She predicts what will happen, tests a small model, measures the result and only then scales up. Chaos engineering applies the scientific method to running systems.

!
Common Misconception

Chaos engineering is not about causing outages for fun, and it is not about blaming people. If an experiment finds a weakness, the weakness belongs to the system, and fixing it is a win for everyone.

3The Vocabulary You Need

A few terms appear again and again. Learn them once and the rest of the topic becomes easy to follow.

Term 1

Fault

The thing that goes wrong, such as a killed pod, a slow network link or a full disk.

Term 2

Experiment

One planned test: a hypothesis, a fault, a target, a duration and a way to measure the result.

Term 3

Steady state

The measurable behavior of a healthy system, used as the baseline for comparison.

Term 4

Blast radius

How much of the system, and how many users, could be affected if the experiment goes wrong.

Term 5

Abort condition

A rule that stops the experiment immediately when the damage crosses an agreed line.

Term 6

Game day

A planned event where a team runs experiments together, observes, and practices its response.

Term 7

Resilience

The ability of a system to keep working, or to recover quickly, when parts of it fail.

Term 8

Failure domain

A group of things that can fail together, such as one machine, one rack or one whole zone.

Simple Analogy

A fire drill has a plan, a pretend fire, a section of the building it covers, a way to measure how quickly people exit and a person with a whistle who can call it off. Each of the terms above has a matching part in a fire drill.

i
Remember

If you cannot say what the steady state is, what the fault is and what the abort condition is, you are not ready to run the experiment yet.

4The Experiment Loop

Every good experiment follows the same loop, from a question to a fix and back to a new question.

The loop begins with a worry. Someone asks, “What happens to our checkout if the payment service becomes slow?” That worry becomes a hypothesis, which becomes a small experiment. After the experiment, the team compares what happened with what they expected, fixes any weakness, and then repeats the same experiment to prove the fix worked. Finally, the experiment is saved so it can be run again automatically in the future.

flowchart LR
  A["Worry or question"] --> B["Hypothesis about steady state"]
  B --> C["Design small experiment"]
  C --> D["Inject the fault"]
  D --> E["Observe and measure"]
  E --> F{"Steady state held?"}
  F -- "Yes" --> G["Grow the scope or automate"]
  F -- "No" --> H["Fix the weakness"]
  H --> C
  G --> A
        
FIG 1 — The experiment loop from worry to fix
Simple Analogy

A cook adjusting a recipe tastes, changes one ingredient, tastes again and repeats. Nobody tastes once and declares the dish finished. Resilience, like cooking, improves by small rounds of tasting and adjusting.

Why a passing result is also valuable

When the steady state holds, the experiment has taught you something useful: your system really can handle that fault. That is real, recorded evidence, and it lets you move on to a harder fault. A team that only celebrates failures will start to fear passing results. A healthy team treats both outcomes as progress.

i
Write It Down

Record each experiment’s hypothesis, result and fix in a shared place. A written history turns scattered discoveries into a library the whole organization can learn from.

5Where Failures Live in a Kubernetes Cluster

A cluster is built in layers, and every layer can fail in its own special way.

To choose good experiments, picture the cluster as a stack. At the bottom is the physical or virtual infrastructure: machines, disks and networks. Above it are the Kubernetes nodes and the control plane that manages them. Above that run the pods and containers. Above those are your applications and the services they depend on, and at the very top are the users. A failure at any level shows up differently at the levels above it.

flowchart TD
  A["Users and business outcomes"] --> B["Applications and dependencies"]
  B --> C["Pods and containers"]
  C --> D["Kubernetes nodes and kubelet"]
  D --> E["Control plane: API server, scheduler, etcd"]
  E --> F["Infrastructure: machines, disks, network, zones"]
        
FIG 2 — The layers of a cluster, each with its own failure modes
LayerExample FaultsQuestion You Can Ask
InfrastructureZone outage, disk failure, lost network linkDoes the system survive losing a whole zone?
Control planeSlow API server, unavailable scheduler, slow etcdDo running workloads keep serving when the control plane struggles?
NodeNode crash, node drain, kubelet stopped, node pressureDo pods move quickly and safely?
Pod and containerContainer crash, pod killed, probe failures, out-of-memory killDoes traffic avoid unhealthy pods?
ApplicationSlow dependency, errors from a database, bad configurationDo timeouts and fallbacks protect users?
Simple Analogy

A tall building can lose power on one floor, a broken elevator, a blocked road outside or a flooded basement. Each problem is different and each needs its own plan. Testing only the elevators tells you nothing about the basement.

!
Do Not Test Only the Easy Layer

Many teams only ever kill pods because it is easy. Real outages often come from the network, dependencies, configuration and the control plane. A balanced program tests every layer.

6Pattern: Pod and Container Failure

The simplest and most common pattern: stop a pod or a container and watch what happens.

Killing a pod is the entry-level experiment. A pod is the smallest unit Kubernetes runs, and a controller such as a Deployment is responsible for keeping the desired number of copies alive. When you remove one, the controller should notice and create a replacement. The experiment teaches you how fast that happens, what users experience in between, and whether your application handles the abrupt end of a running process.

Variant 1

Delete a pod politely

The pod receives a termination signal, has time to finish work and then stops. Tests graceful shutdown.

Variant 2

Kill a container abruptly

The process is stopped with no warning, like a crash. Tests how the system copes with sudden loss and restarts.

Variant 3

Kill many pods at once

Removes a large share of replicas together. Tests capacity headroom and startup speed under stress.

Variant 4

Repeated random kills

Removes pods at random intervals over time. Tests that resilience is continuous, not a one-time event.

Simple Analogy

A restaurant with five waiters should keep serving when one calls in sick. Asking one waiter to go home mid-shift shows whether the others can cover, whether tables are reassigned smoothly and whether customers notice a delay.

What this pattern typically reveals

1

Single replica services

A service with only one copy goes completely dark when that pod is removed, even if briefly.

2

Slow startup

If a replacement takes minutes to become ready, the remaining pods carry extra load for that long.

3

Dropped in-flight requests

Requests being handled when the pod ends may fail if the application does not finish its work gracefully.

4

Lost local state

Anything kept only in a pod’s memory or temporary disk disappears with it.

i
Start Here

If your team has never run an experiment, begin by removing one pod of a non-critical service in a test environment and measuring how long it takes for full capacity to return.

7Pattern: Node and Zone Failure

When a whole machine, or a whole data center area, disappears, many pods vanish at once.

A node is a single machine in the cluster. Nodes fail for many reasons: hardware faults, kernel crashes, cloud providers reclaiming discounted machines, network cards failing or a bad update. When a node stops responding, Kubernetes marks it as not ready after a waiting period. After a further delay, pods on that node are marked for removal and their controllers create replacements elsewhere. This delay is a surprise to many teams, because the cluster does not react instantly.

sequenceDiagram
  participant N as Failed node
  participant C as Control plane
  participant K as Controller
  participant O as Other nodes
  N--xC: Stops sending heartbeats
  C->>C: Waits for grace period
  C->>C: Marks node not ready
  C->>K: Pods on node are unreachable
  K->>O: Create replacement pods
  O-->>C: New pods become ready
        
FIG 3 — What happens, and how slowly, when a node silently dies

Ways to inject node failures

Method 1

Drain a node

Politely evicts all pods from a node, as during maintenance. Tests disruption budgets and rescheduling.

Method 2

Cordon and taint

Prevents new pods or evicts existing ones using node markings. Tests placement rules.

Method 3

Stop the machine

Powers off a virtual machine through the cloud provider. Tests the rough, silent failure.

Method 4

Stop the node agent

Halts the kubelet while the machine stays up. Tests the cluster’s handling of unreachable nodes.

Zone failure: the bigger test

Cloud clusters often span several failure zones. A zone-failure experiment removes every node in one zone together. It asks the hardest questions: were replicas truly spread across zones, is there enough spare capacity in the remaining zones, do storage volumes tied to one zone block recovery, and does the load balancer stop sending traffic to the dead zone quickly?

Simple Analogy

A chain of stores should survive one branch closing for a day. That is only true if the other branches have enough staff and stock to serve the extra customers. Zone failure experiments check the spare staff and stock.

!
Spread Matters

Having three replicas means nothing if the scheduler placed all three on the same node or in the same zone. Always check actual placement, not only the replica count.

8Pattern: Network Latency, Loss and Partition

Networks are the most common source of strange, partial failures in distributed systems.

A server that is completely dead is easy to detect. A network that is merely slow, lossy or sometimes unreachable is much harder, because everything appears to be working, just badly. Calls hang, retries pile up and timeouts fire at unpredictable moments. Network faults are therefore among the most valuable failures to inject, and they are available in nearly every chaos tool.

FaultWhat It DoesWhat It Teaches
DelayAdds waiting time to packetsWhether timeouts and user experience hold up when a dependency is slow
Packet lossDrops a share of packetsWhether retries work and whether connections recover
Duplication and corruptionRepeats or damages packetsWhether the application tolerates repeated or damaged data
Bandwidth limitSlows the data rateWhether large transfers starve other traffic
PartitionBlocks traffic between two groupsWhether the system behaves safely when parts cannot talk to each other
Simple Analogy

A phone line that is totally dead makes you hang up and try another number. A line full of crackle and delays makes you repeat yourself, talk over each other and misunderstand. Slow and flaky is usually harder to handle than gone.

The partition and the split-brain problem

A network partition cuts the cluster into groups that cannot reach each other. This is the cruelest test for stateful systems such as databases and message brokers. Each side may believe the other is dead and try to take over. If both sides accept writes, the data diverges, a problem called split brain. A partition experiment shows whether your system chooses safety by refusing service on the smaller side, or chooses availability and risks inconsistency.

Example: The slow payment provider

A shop adds three hundred milliseconds of delay to calls from the checkout service to the payment service. The hypothesis is that checkout stays within its time target. The experiment reveals that checkout waits thirty seconds with no timeout, and all web threads fill up. The team adds a short timeout and a friendly retry message.

i
Inject Delay Before Loss

Slow dependencies are more common than dead ones. Start with modest delay and grow it gradually, observing where each service starts to break.

9Pattern: DNS and Service Discovery Failure

When names stop resolving, almost everything breaks at once, so it deserves its own experiments.

Inside Kubernetes, pods find each other by names. A small cluster service, usually CoreDNS, turns those names into addresses. Almost every call between services begins with a name lookup. If lookups fail or become slow, every service that depends on another service suffers, even though all of the actual programs are healthy. For this reason, DNS is a classic hidden single point of failure.

Simple Analogy

Imagine a city where the phone book vanishes overnight. All the people are fine and every phone works, yet nobody can call anyone because they do not know the numbers. DNS is the phone book of the cluster.

Fault 1

DNS server unavailable

Remove or stop the DNS pods and see which services fail first and how long they take to recover.

Fault 2

DNS slow responses

Add delay to lookups and see whether applications cache results or wait forever.

Fault 3

Wrong answers

Return failure or incorrect results for chosen names to test fallback behavior.

Fault 4

External name failure

Make names outside the cluster fail to resolve to test dependencies on outside services.

Typical discoveries

Good Signs

  • Applications cache lookups for a sensible time
  • Several DNS replicas spread across nodes
  • Clear, quick errors instead of hanging
  • Alerts that point directly at DNS

Warning Signs

  • Only one DNS replica or all on one node
  • Applications that look up a name on every request
  • Long hangs with no timeout
  • No alert until users complain
!
Handle With Care

DNS affects the whole cluster, including the tools you use to observe the experiment. Start in a test environment, keep the blast radius small by targeting specific pods, and have a quick way to restore DNS.

10Pattern: Resource Stress

Starve a pod or a node of processor, memory, disk or input speed, and see who suffers.

Not every failure is a clean stop. A very common real-world problem is that a resource becomes scarce. A runaway program eats all the CPU. A memory leak slowly fills the machine. A log file fills the disk. A busy disk slows every read and write. Stress experiments create these conditions on purpose so you can watch how pods, neighbors and the node itself respond.

Stress 1

CPU stress

Burn processor time inside a target. Shows throttling, slow responses and the effect on neighbors.

Stress 2

Memory stress

Consume memory up to or beyond a limit. Shows out-of-memory kills, restarts and node pressure evictions.

Stress 3

Disk fill

Write large files until space runs low. Shows disk pressure, failed writes and evictions.

Stress 4

Disk input and output slowdown

Add delay or errors to disk reads and writes. Shows how databases and logs behave with a sick disk.

Simple Analogy

A kitchen can keep running with one broken oven but struggles if the gas pressure drops for everyone. Stress experiments lower the shared resource slowly and observe which dishes burn first.

What stress experiments reveal

These experiments are the best way to test your resource requests, limits and quality-of-service choices. If a stressed pod without a limit takes down its neighbors, you have found a missing guardrail. If a pod with a proper limit is killed and restarts cleanly while the neighbors never notice, the guardrails work. They also show whether your alerts fire early enough, before users feel pain.

Example: The leaking cache

A team injects steady memory growth into a caching service. The hypothesis is that only that pod restarts. The experiment shows that two unrelated pods on the same node are evicted too, because their memory requests were far below their real usage. The team raises the requests and adds a memory alert.

i
Ramp Slowly

Increase stress in small steps and watch the signals at each step. A gentle ramp tells you exactly where the breaking point is, while a sudden maximum only tells you that something broke.

11Pattern: Application-Level Faults and Service Mesh Injection

Sometimes the best way to test a dependency failure is to make the calls themselves misbehave.

Many outages begin when one service answers slowly or with errors, and its callers react badly. You can simulate this without touching machines or networks. A service mesh, which is a layer of small helper proxies sitting beside each pod, can intercept calls between services. Because the proxy sees every request, it can be told to delay a share of them or to answer with an error instead of passing them on. This is called fault injection at the application level, and it is precise, safe and easy to limit to certain routes, certain callers or a small percentage of traffic.

flowchart LR
  A["Caller service"] --> B["Proxy beside caller"]
  B -- "Most requests pass" --> C["Target service"]
  B -- "Small share delayed" --> C
  B -- "Small share answered with error" --> D["Error returned to caller"]
        
FIG 4 — A proxy delaying or failing a chosen share of calls
Fault 1

Added delay

Hold chosen requests for a fixed time to test timeouts and perceived speed.

Fault 2

Forced error responses

Answer with server errors or unavailable messages to test retries, fallbacks and error pages.

Fault 3

Aborted connections

Cut the connection partway through to test how clients handle half-finished calls.

Fault 4

Targeted faults

Apply faults only to requests with a certain header, so testers can break their own calls while real users are untouched.

Simple Analogy

A switchboard operator can be asked to put one in twenty calls on hold for a minute or to say “the line is busy”. Callers then show how patient they are and what they do when they hear a busy tone. The proxy is the operator.

i
Safest Way to Start in Production

Header-targeted faults let you test in the real environment using only your own test requests. Customers are never affected, yet the experiment crosses real networks and real configuration.

!
Limits of This Pattern

Application-level injection tests how callers react to a bad response, but it does not test what happens when the real dependency is truly sick, such as slow disks or exhausted threads. Combine it with deeper faults.

12Pattern: Control Plane Failure

What happens to running applications when the brain of the cluster is slow or unreachable?

The control plane is the set of components that manage the cluster: the API server that accepts requests, the scheduler that places pods, the controller manager that keeps desired state, and the data store called etcd that holds everything. A common belief is that if the control plane fails, everything stops. In reality, pods already running on nodes usually keep running, because the node agents continue their work without constant instructions. What stops is change: no new pods are scheduled, no failed pods are replaced, no scaling happens and no updates roll out.

1

API server slowness

Make requests to the API server slow. Observe which tools, controllers and applications depend on it during normal operation.

2

API server unavailable

Make it unreachable for a short time in a test cluster. Confirm that traffic to existing pods keeps flowing and see what breaks.

3

Slow data store

Add disk or network delay to etcd to see how the whole control plane slows down.

4

Scheduler or controller stopped

Pause one component to see how long the cluster can go without it before users feel impact.

Simple Analogy

If the head office of a restaurant chain loses its phones, the branches keep serving customers using their daily routines. But no new menus arrive, no new staff are hired and nobody can order special supplies. The control plane is the head office.

Hidden dependencies on the API server

Many applications quietly depend on the API server while running. Operators that watch resources, autoscalers, leader election mechanisms, and service mesh control components all talk to it. When the API server struggles, these can fail in surprising ways, such as losing leadership and restarting, or scaling incorrectly. Experiments reveal the dependencies you did not know you had.

!
Managed Clusters

On managed services, the cloud provider operates the control plane and you usually cannot break it directly. You can still simulate it by blocking or slowing calls to the API server from your workloads, which tests the same dependencies safely.

13Pattern: Storage and Stateful Workload Failure

Stateless pods are easy to replace. Stateful ones carry data, and data makes failure serious.

Databases, queues and caches keep important information on disks that outlive any single pod. Kubernetes handles this using persistent volumes, which are storage pieces that can be attached to a pod and re-attached after a restart. The tricky part is that a volume is often tied to one zone and can only be attached to one node at a time. When a node fails, the replacement pod may have to wait until the old attachment is released, and that wait can be long.

Experiment 1

Kill a database pod

Measure how long until the replacement is ready and whether data and connections recover.

Experiment 2

Fail the leader

Stop the leader of a replicated system and measure how quickly a new leader is elected and clients reconnect.

Experiment 3

Volume attach delay

Simulate slow volume detachment after node loss and measure the recovery time.

Experiment 4

Restore from backup

Actually restore a backup into a test environment. A backup that has never been restored is only a hope.

Simple Analogy

Replacing a broken chair is easy. Replacing a broken filing cabinet full of records is not, because the records must be saved, moved and checked. Stateful workloads are filing cabinets, so experiments on them need extra care.

The questions that matter most

Check Carefully

  • How much data could be lost, and for how long can the service be unavailable?
  • Does the replica set elect a new leader without human help?
  • Can volumes attach in another zone after a failure?
  • Have backups been restored and verified recently?

Common Surprises

  • A replacement pod stuck waiting for its volume
  • Clients that never reconnect after a leader change
  • Replicas that fall far behind and cannot catch up
  • Backups that are empty or unreadable
!
Never Start in Production With Data at Stake

Run stateful experiments first on copies of data in test environments. Move to production only with fresh verified backups, a small blast radius and a team ready to respond.

14Pattern: Bad Configuration, Rollouts and Image Failures

A large share of real outages are not hardware failures at all. They are changes that went wrong.

Surveys of incidents in many companies keep finding the same fact: most outages follow a change. A new version with a bug, a configuration edit with a typo, a certificate that expired, an image that could not be downloaded. These are failures of deployment and configuration, and Kubernetes has its own versions of them. You can rehearse these failures just as you rehearse hardware ones.

FaultHow to SimulateWhat You Learn
Image cannot be pulledPoint a test workload to a missing image or block the registryWhether rollouts stall safely and old pods keep serving
Bad new versionRoll out a version that crashes on startWhether the rollout halts and alerts fire before old pods are removed
Wrong configuration valueApply an invalid setting in a test environmentWhether validation or health checks catch it early
Missing secret or config mapRemove a referenced objectWhether pods fail clearly and recover once restored
Registry outageBlock access to the image registryWhether scaling and node replacement still work using cached images
Simple Analogy

A bakery that changes its recipe should taste a test batch before replacing all the bread on the shelves. Rollout experiments check that the bakery notices a bad batch and keeps the old bread until the new bread is proven.

What good rollout safety looks like

1

Readiness checks gate new pods

New pods receive traffic only after they report that they are truly ready.

2

Rollout limits the number of changes at once

Only a few pods are replaced at a time, so a bad version cannot take everything down.

3

Alerts catch a stuck rollout

If new pods never become ready, an alert tells humans quickly.

4

Rollback is fast and rehearsed

Teams have practiced going back to the previous version and know how long it takes.

i
Test Your Rollback

Many teams build rollback procedures and never run them. Practice rolling back during a game day so the first real use is not under pressure.

15Pattern: Time, Clock and Certificate Failures

Time is a hidden dependency. When clocks drift or certificates expire, strange failures follow.

Programs assume that the clock is correct. Security certificates have start and end dates. Tokens expire. Schedules depend on the time. Distributed databases use timestamps to order events. If the clock on one machine drifts by minutes, certificates may be judged as not yet valid or already expired, tokens may be rejected, and replicated data may be ordered wrongly. Because these faults are rare in daily life but nasty when they happen, injecting them is highly educational.

Fault 1

Clock skew

Shift the clock seen by a pod forward or backward and watch how timestamps, caches and tokens react.

Fault 2

Certificate expiry

Use a short-lived certificate in a test setting and let it expire to see how services and alerts respond.

Fault 3

Token expiry

Expire credentials early and check that applications refresh them without human help.

Fault 4

Scheduled job drift

Skew time for scheduled jobs and check that they neither skip nor run twice.

Simple Analogy

If every clock in a train station shows a different time, trains appear to leave before they arrive, and tickets look expired. People get confused and angry even though every train works perfectly. Shared time is a quiet agreement that everything relies on.

Example: The expiring internal certificate

A company shortens the lifetime of an internal certificate in a test cluster to one hour. After it expires, the service refuses connections and the team finds that no alert existed and renewal had been manual. They automate renewal and add an alert that warns thirty days before expiry.

!
Certificates Fail on a Calendar

Expiry outages are predictable yet frequent. A simple inventory of certificates with dates and automatic renewal removes a whole category of incidents.

16Pattern: Probes and Lifecycle Failure

Kubernetes decides who receives traffic using health checks. Break the checks and you test the safety net itself.

Kubernetes uses three kinds of probes. A liveness probe asks whether a container is stuck and should be restarted. A readiness probe asks whether a container is ready to receive traffic. A startup probe gives slow starters extra time. These probes are the cluster’s eyes. If they are wrong, traffic goes to sick pods or healthy pods are restarted needlessly. Failure injection can make probes fail on purpose to see what the cluster does.

Test 1

Fail readiness on one pod

The pod should stop receiving traffic but keep running. Confirm that load shifts smoothly to the others.

Test 2

Fail liveness on one pod

The pod should be restarted. Confirm that the restart is clean and does not cause a flood.

Test 3

Fail readiness on all pods

Every pod stops receiving traffic at once. This reveals what users see when a service has no ready backends.

Test 4

Slow shutdown

Make termination slow to check that connections drain before the pod is forcibly removed.

Simple Analogy

A restaurant host seats guests only at tables marked ready. If every table is marked not ready by mistake, guests stand outside even though the kitchen is empty and waiting. Readiness probes are those table markers.

The shutdown dance

When a pod is told to stop, two things happen at the same time. The pod receives a termination signal, and the cluster begins removing the pod from the list of backends that receive traffic. Because these are separate and not perfectly synchronized, a pod can stop before every router has stopped sending it requests, and those requests fail. Applications that wait a few seconds before exiting, and finish in-flight work, avoid these errors. Experiments that kill pods under load expose the problem clearly.

i
Measure Errors During Shutdown

Kill pods while a steady load test runs, and count failed requests. Zero errors means graceful shutdown is working. Any errors mean the shutdown sequence needs attention.

17Pattern: Admission, Policy and Webhook Failure

Components that sit in the request path of the API server can themselves become the reason nothing works.

Many clusters run admission webhooks, which are programs that the API server calls before accepting a new or changed resource. They enforce policy, add defaults or inject helper containers. Because the API server waits for their answer, a slow or unavailable webhook can block deployments entirely, or, depending on its failure setting, allow requests through without protection. This makes webhooks a fascinating target for failure injection.

1

Make the webhook slow

Add delay to the webhook service and see whether deployments slow or time out.

2

Make it unavailable

Stop the webhook pods and observe whether the failure setting fails open or fails closed.

3

Check the recovery path

Confirm that engineers know how to remove or relax the webhook if it blocks even the fix.

Simple Analogy

A building has a security desk at the front door. If the guard falls asleep, the door either stays locked and nobody enters, or stays open and anybody walks in. Both outcomes are bad. The experiment shows which one your building chose and whether there is a spare key.

ANTI-PATTERN-01 Avoid
Problem

A policy webhook set to fail closed covers every namespace, including the namespace where the webhook itself runs.

Why It’s Harmful

If the webhook pods are ever unhealthy, they cannot be recreated, because creating them requires the webhook to approve them. The cluster locks itself out of its own repair.

Correct Approach

Exclude the webhook’s own namespace and system namespaces, run several replicas and rehearse the emergency bypass.

!
Be Ready to Roll Back

Because this experiment can block deployments across the whole cluster, run it in a test cluster first and keep a practiced, documented way to remove the webhook configuration quickly.

18Pattern: Autoscaling and Capacity Failure

Autoscalers add safety, but they have delays and assumptions that can be tested.

Autoscaling features add pods when load rises and add nodes when pods cannot be placed. They are valuable but not instant. New pods take time to start, new nodes take minutes to join, and autoscalers depend on metrics that may themselves fail. An experiment can show what really happens during a sudden surge, or when the metrics system is down, or when the cloud has no more machines of the requested type available.

Test 1

Sudden traffic surge

Generate a spike with a load tool and measure how long until capacity catches up and what users feel in between.

Test 2

Metrics source unavailable

Break the metrics provider and see whether the autoscaler freezes safely or scales wrongly.

Test 3

No machines available

Simulate the cloud being unable to provide new nodes and see whether important pods are protected.

Test 4

Quota exhaustion

Hit a namespace or account quota deliberately to see how failures are reported.

Simple Analogy

A shop that hires extra staff on busy days still suffers if hiring takes three hours and the rush lasts thirty minutes. Autoscaling experiments measure the time between the rush and the extra help.

i
Priorities Protect Important Work

When capacity truly runs out, priority classes decide who is displaced. A capacity experiment shows whether your most important services are indeed the last to be removed.

19The Resilience Mechanisms You Are Really Testing

Failure injection is not testing Kubernetes. It is testing the protective habits your applications are supposed to have.

When you inject a fault, you are really checking whether the defenses built into your applications and platform work. Each defense has a common way of being wrong, and failure injection is the best way to find that out. Here are the most important defenses and what experiments reveal about them.

Defense 1

Timeouts

Every call to another service should give up after a sensible time. Without a timeout, one slow dependency can freeze every caller.

Defense 2

Retries

Repeating a failed call helps with brief glitches but can multiply load on a struggling service if done carelessly.

Defense 3

Circuit breakers

After repeated failures, stop calling for a while to give the dependency room to recover.

Defense 4

Fallbacks

Offer a reduced but useful answer, such as cached data, when the real source is unavailable.

Defense 5

Bulkheads

Separate resources so that trouble in one part cannot drain resources from another part.

Defense 6

Load shedding

Refuse some requests on purpose when overloaded, so that the rest are served well.

The retry storm

The most famous failure of a well-meant defense is the retry storm. A dependency slows down. Callers time out and retry. The retries add load to the already struggling dependency, which slows it further, which causes more timeouts and more retries. A small problem becomes a large outage that feeds on itself.

flowchart TD
  A["Dependency becomes slow"] --> B["Callers time out"]
  B --> C["Callers retry immediately"]
  C --> D["Extra load on dependency"]
  D --> A
  C --> E["Backoff and retry limits break the loop"]
        
FIG 5 — A retry storm and the habit that breaks it
Simple Analogy

When a shop is overwhelmed with customers and the queue grows, people who give up and rejoin the queue make it longer. Politely waiting longer between returns, and limiting how often anyone may return, brings the queue under control.

i
Use Backoff and Jitter

Space retries further apart each time and add a little randomness, so that thousands of clients do not all retry at the same instant.

20Defining Steady State and Service Level Objectives

You cannot tell whether an experiment broke something unless you agreed in advance what unbroken looks like.

The steady state is expressed with measurements that reflect what users experience, not what machines feel. CPU usage is a poor steady state signal because users do not care about it. A better signal is the share of requests that succeed, the time taken by the slowest few percent of requests, or the number of orders completed per minute. These are often written as service level indicators, with targets called service level objectives.

Signal TypeExampleGood for Steady State?
User-facing successShare of requests returning successExcellent
User-facing speedTime within which ninety-nine percent of requests completeExcellent
Business outcomeOrders completed per minuteExcellent
Internal healthNumber of ready podsUseful as a supporting signal
Machine metricCPU usage on a nodeWeak on its own
Simple Analogy

A restaurant judges its health by how long customers wait and how many leave happy, not by how many onions are in the fridge. Machine metrics are onions. Customer experience is the real steady state.

Error budgets and chaos

A service level objective implies an error budget, which is the small amount of failure the objective allows. Experiments spend a little of this budget on purpose, in return for knowledge. Teams that are already over budget should fix reliability first and avoid adding risk. Teams with plenty of budget can safely run more ambitious experiments. This link gives chaos work a natural pace and a business-friendly justification.

Define
Pick user-facing signals and targets
Measure
Record the baseline before every experiment
Compare
Judge the result against the baseline
!
No Baseline, No Experiment

Running a fault without a measured baseline leaves you arguing about whether things looked worse. Always capture a few minutes of normal data first.

21Patterns for Controlling the Blast Radius

The skill in failure injection is not breaking things. It is breaking exactly as much as you intended, and no more.

Blast radius is the amount of damage an experiment could cause if it goes wrong. The golden rule is to begin with the smallest possible radius and grow it only as confidence grows. Kubernetes gives many natural ways to shrink the radius, because it has labels, namespaces, replicas and traffic routing that can all be used as boundaries around an experiment.

flowchart LR
  A["One pod in a test namespace"] --> B["One pod in staging"]
  B --> C["Several pods in staging"]
  C --> D["One pod in production with test traffic only"]
  D --> E["Small share of real traffic"]
  E --> F["Whole service or zone in production"]
        
FIG 6 — A ladder of growing blast radius
Boundary 1

Namespace and label selection

Target only pods with a specific label in a specific namespace. Everything else is untouched.

Boundary 2

Percentage of targets

Affect only a fraction of matching pods, such as one in ten, rather than all of them.

Boundary 3

Short duration

Run for seconds or minutes, not hours. A short fault limits the time anyone can be harmed.

Boundary 4

Traffic scoping

Apply faults only to test requests, or only to a small share of real requests.

Boundary 5

Time windows

Run during working hours when experts are present, not at night or on weekends.

Boundary 6

Isolated environments

Use a copy of production with synthetic traffic for the riskiest experiments.

Simple Analogy

A fire drill begins on one floor with warning, not in the whole building during a crowded event. You enlarge the drill only after the small one went well. The ladder of blast radius is the drill growing floor by floor.

i
Climb One Rung at a Time

Never jump from a test namespace straight to a whole production zone. Each step up the ladder gives evidence that the next step is safe.

22Abort Conditions and Safety Nets

Every experiment needs a way to stop immediately, and ideally a way to stop itself.

Even careful experiments can behave unexpectedly. Abort conditions are rules written before the experiment that define when to stop. They are tied to the same steady state signals you defined earlier. For instance: “If the success rate of checkout falls below ninety-eight percent for two minutes, stop immediately.” Good chaos tools can watch the signal and halt the experiment automatically, which removes the delay of a human noticing and reacting.

1

Automatic abort

The experiment watches a user-facing signal and stops itself when the signal crosses a line.

2

Manual stop button

A named person has the authority and the tool to stop everything instantly, with no meeting required.

3

Automatic recovery

Faults are time-limited, so that even if the tool itself fails, they end by themselves.

4

Rollback plan

A written, practiced way to undo any leftover changes, such as removed labels or edited settings.

Simple Analogy

A roller coaster has an emergency brake that engages automatically when something is wrong, plus a human operator with a stop button. Nobody relies on the ride simply being fine. Chaos experiments deserve the same layered safety.

ANTI-PATTERN-02 Avoid
Problem

Running an experiment with an open-ended duration and no automatic stop, relying on someone remembering to end it.

Why It’s Harmful

If the engineer is interrupted, or the tool crashes, the fault can continue for hours and turn a test into an outage.

Correct Approach

Give every fault a short maximum duration, link it to abort signals and ensure the faults clean up on their own.

!
Test the Stop Button

Verify that your abort mechanism works before you rely on it. An untested emergency brake is only a hope.

23The Tooling Landscape

You can inject failures with simple built-in commands, with dedicated chaos projects, with service meshes or with cloud services.

There is no single correct tool. Many teams start with plain Kubernetes features because they need nothing extra, then adopt a dedicated chaos platform as their program grows. Several open source chaos projects for Kubernetes belong to the Cloud Native Computing Foundation, and cloud providers offer their own managed fault services. Tools change quickly, so check current documentation before choosing.

ApproachWhat It OffersGood ForWatch Out For
Built-in Kubernetes actionsDeleting pods, draining nodes, tainting, scaling down, changing labels and configurationFirst experiments, no installationLimited fault types, manual effort
Kubernetes-native chaos platformsDeclarative experiments for pods, network, stress, input and output, time, and more, often with schedules and dashboardsRegular, repeatable experiments across many fault typesNeeds careful access control, extra components to operate
Workflow-style chaos frameworksExperiments combined with checks and automatic rollback in a defined sequencePipelines and structured game daysMore setup, learning curve
Service mesh fault injectionDelay and error injection on request routesApplication-level and header-targeted testsOnly covers calls through the mesh
Cloud provider fault servicesMachine stops, zone-level failures, network disruption at infrastructure levelInfrastructure and zone testsCloud-specific, permissions, cost
Commercial chaos platformsManaged experiments, safety controls, reportingLarger organizations wanting supportCost and vendor dependence
Simple Analogy

To test a building’s emergency exits you can simply open a door and walk through, hire a safety company with special equipment or ask the fire department to run a full drill. The right choice depends on how big the building is and how often you plan to test.

i
Choose by Need, Not Fashion

Pick the simplest tool that covers your next three experiments. Adopt more powerful tooling when you truly feel the limits of the simple one.

24How Chaos Tools Work Inside Kubernetes

Understanding the machinery helps you trust it, secure it and debug it.

Most Kubernetes chaos platforms share a similar design. You describe an experiment as a Kubernetes resource, stating the fault type, the targets and the duration. A controller running in the cluster reads the resource and decides what must be done. For faults that need deep access to a node, such as network disruption or stress, a small helper program runs on each node and carries out the fault using features of the operating system. When the experiment ends or is deleted, the controller instructs the helper to undo the fault.

flowchart TD
  A["Engineer or pipeline creates experiment resource"] --> B["Chaos controller reads it"]
  B --> C["Selects targets by labels and namespace"]
  C --> D["Node helper receives instruction"]
  D --> E["Applies fault using operating system features"]
  E --> F["Timer or abort ends the experiment"]
  F --> G["Helper removes the fault"]
  G --> H["Status and results recorded"]
        
FIG 7 — The usual flow of a Kubernetes chaos platform
Simple Analogy

A theatre director writes a script, which is the experiment resource. A stage manager, the controller, reads the script and decides which actors are needed. Stagehands in each wing, the node helpers, carry out the actual changes. When the scene ends, they restore the stage.

Why this design deserves respect

The node helper needs strong permissions because it changes network rules, uses system resources and can kill processes. That is powerful. If the chaos platform itself were compromised, an attacker could use it to cause damage at a large scale. Treating the chaos platform as high-privilege infrastructure, with careful access control, is therefore essential.

!
Powerful Tools Need Guard Rails

A chaos tool with unrestricted cluster-wide permissions is a loaded weapon. Limit which namespaces it may touch, who may create experiments and what fault types are enabled in each environment.

25Safe Access: Permissions, Opt-In and Approvals

Who may break what, and when, is a governance question as much as a technical one.

In an organization with many teams, experiments on one team’s services can hurt another team’s users. A healthy program therefore sets rules. Services must opt in before they can be targeted. Only trained people may run experiments, and only certain fault types are allowed in each environment. Production experiments need extra approval. These rules protect trust, which is the most precious asset of a chaos program.

1

Opt-in by label or annotation

Only workloads that carry an explicit marker can be targeted. Owners decide when their service is ready.

2

Role-based access control

Limit who can create experiment resources, and in which namespaces, using ordinary Kubernetes permissions.

3

Environment tiers

Allow gentle faults broadly, and restrict dangerous faults to test environments or supervised game days.

4

Approvals and calendars

Require sign-off for production experiments and publish a calendar so nobody is surprised.

5

Audit trail

Keep a record of who ran what, when and with what result.

Simple Analogy

A fire drill requires notice, a responsible warden and a record that it took place. Nobody sets off alarms in the middle of the night without telling anyone. Chaos experiments need the same social contract.

i
Policy Can Enforce the Rules

An admission policy engine can reject experiment resources that target namespaces without the opt-in marker or that exceed agreed durations, making the rules automatic rather than a matter of memory.

26Running a Game Day

A game day is a rehearsal for a whole team, combining experiments with human practice.

Individual experiments teach systems. Game days teach people. In a game day, a group gathers, often for a few hours, to run planned failures while practicing how they would notice, diagnose and fix the problems. The group includes the engineers who own the services, someone to run the experiment, someone to watch the dashboards and someone to take notes. The best game days are friendly, structured and focused on learning.

sequenceDiagram
  participant F as Facilitator
  participant R as Responders
  participant S as System
  F->>R: Brief the plan and safety rules
  F->>S: Capture baseline metrics
  F->>S: Inject the first fault
  R->>S: Detect, diagnose and respond
  S-->>F: Signals and recovery time
  F->>S: Stop faults and verify recovery
  F->>R: Debrief and record actions
        
FIG 8 — The shape of a game day
1

Prepare

Choose two or three experiments, write hypotheses, agree on abort rules, notify everyone affected and verify that dashboards and alerts work.

2

Run

Inject faults one at a time. Let responders work without hints, unless safety demands help.

3

Observe

Record how long detection took, how responders reasoned and which tools or documents were missing.

4

Debrief

Hold a blameless review. List surprises, fixes and owners with dates. Turn lessons into tracked work.

Simple Analogy

A sports team holds scrimmages with a coach watching, not because the real game is tomorrow, but because teamwork improves only when practiced together. A game day is the scrimmage for the on-call team.

i
Measure the Human Side

Time to detect, time to understand and time to recover are as important as the system’s behavior. Record them every time and watch them shrink.

27Continuous Chaos in Pipelines and Schedules

One-time experiments decay. Resilience stays real only when the experiments keep running.

A service that survived a pod kill in March may fail in September after a new feature, a new dependency or a changed configuration. To keep resilience from silently eroding, mature teams automate their experiments. Some run as part of the delivery pipeline, so every new version must pass a small set of fault tests before reaching production. Others run on a schedule in the background, at gentle intensity, all the time.

Mode 1

Pipeline gate

After deployment to a staging environment, run a short fault test. If the steady state fails, the release is blocked.

Mode 2

Scheduled experiments

Run low-intensity faults regularly during working hours so weaknesses are caught as they appear.

Mode 3

Post-incident replay

After an outage, turn its cause into an automated experiment so it can never silently return.

Mode 4

Deployment-triggered tests

Run a relevant experiment whenever a service or its dependencies change.

Simple Analogy

Brushing your teeth once a year would not protect them. A short daily habit does. Continuous experiments are the daily brushing of resilience.

Advantages

  • Regressions are caught within hours or days
  • Resilience becomes a normal engineering habit
  • Less reliance on heroic, rare events
  • Confidence grows with each passing run

Disadvantages / Trade-offs

  • Needs reliable, automated signals and abort rules
  • Can produce false alarms if tests are flaky
  • Uses effort to maintain experiments as systems change
!
Flaky Tests Destroy Trust

If an automated experiment fails for reasons unrelated to real weakness, people start ignoring it. Keep each experiment small, stable and well measured.

28Observability: Seeing What the Experiment Does

An experiment you cannot observe teaches you nothing. Your monitoring is the measuring instrument.

Before the first experiment, make sure you can see the system clearly. You need metrics for user-facing signals, logs that show errors, and traces that follow a request through many services. During an experiment, these views should be on a single shared dashboard, with the start and end times of the fault marked clearly so changes line up with causes.

Signal 1

Metrics

Success rate, latency, traffic and saturation for each service, shown alongside the fault window.

Signal 2

Logs

Error messages and retries that explain what callers experienced.

Signal 3

Traces

The path of one request across services, showing where time was lost or failures began.

Signal 4

Events and annotations

Markers on the dashboard that show when the experiment began and ended.

Simple Analogy

A doctor who gives a patient a stress test attaches heart monitors first. Without the monitors, the test only shows that the patient was tired. Observability is the set of monitors attached before the stress begins.

Test your alerts too

Experiments are the best way to test alerting. If a fault that clearly hurts users does not trigger any alert, the monitoring has a gap. Record which alerts fired, how long they took and whether they pointed engineers in the right direction. Fixing alert gaps is one of the most valuable outcomes of any chaos program.

i
Mark the Timeline

Write experiment start and end times as annotations on your dashboards. Months later, people reviewing a graph can instantly see which wobble was deliberate.

29The Anatomy of a Good Experiment Card

A one-page description for every experiment keeps everyone aligned and safe.

Before running any experiment, write a short card that answers the same questions every time. The card is reviewed by the service owner and anyone who could be affected. After the run, the card is updated with results. Over time, a collection of cards becomes your resilience library and training material for new engineers.

FieldQuestion It AnswersExample
Title and ownerWhat is this, and who is responsible?Payment delay test, owned by the checkout team
HypothesisWhat do we expect to stay true?Checkout success stays above ninety-nine percent
Steady state signalsHow do we measure that?Success rate and slowest-percent latency of checkout
Fault and targetWhat do we break, and where?Add delay to calls to the payment service from two pods
Blast radius and durationHow much and for how long?Ten percent of pods for five minutes
Abort conditionsWhen do we stop?Success rate below ninety-seven percent for one minute
RollbackHow do we undo it?Delete the experiment resource, verify delay is gone
Result and actionsWhat did we learn and fix?No timeout existed, added one, retested
Simple Analogy

A pilot follows a checklist before every flight, no matter how many flights she has made. The checklist is not a sign of doubt. It is how safe things stay safe. The experiment card is the pilot’s checklist.

i
Keep It to One Page

If the card grows long, the experiment is probably too complicated. Split it into smaller experiments that each answer one question.

30A Maturity Path for Failure Injection

Organizations grow into chaos engineering in stages. Knowing the stages helps you pick the next step.

1

Ad hoc

Individual engineers occasionally delete a pod in a test environment. Little is recorded.

2

Structured

Experiments have hypotheses, owners and written cards. Game days occur a few times a year.

3

Automated

Experiments run in pipelines and on schedules with automatic abort rules in staging.

4

Production-grade

Small, safe experiments run in production during working hours, guided by error budgets.

5

Cultural

Resilience is part of design reviews. New services ship with their own experiments, and incidents become new automated tests.

Stage 1 to 2
Add hypotheses and written cards
Stage 2 to 3
Automate and add abort rules
Stage 3 to 5
Carefully enter production and build culture
Simple Analogy

Learning to swim begins in the shallow end with a teacher watching, moves to the deep end with practice, and eventually reaches open water. Nobody starts in the sea. Chaos engineering also begins in safe water.

!
Do Not Skip Stages

Teams that jump straight to production chaos without hypotheses, observability and abort rules usually cause an outage and set the whole program back by a year.

31Culture: Blameless Learning and Shared Ownership

The hardest part of chaos engineering is rarely the technology. It is making people comfortable with finding problems.

If engineers fear that a discovered weakness will be used to criticize them, they will avoid experiments or hide results. A strong program is built on blameless learning: the assumption that people did their best with the information they had, and that weaknesses belong to the system. When a team finds a problem through an experiment, the right response from leaders is thanks, because the team just prevented a future outage.

Habit 1

Celebrate findings

Share discoveries openly and thank the people who made them. Findings are gifts, not failures.

Habit 2

Invite the owners

Never surprise a team with an experiment on its service. Plan with them, and let them lead where possible.

Habit 3

Track fixes to completion

A finding without a fix is just a story. Assign owners and dates and review progress.

Habit 4

Share the library

Publish experiment cards and results so other teams can reuse them and learn from them.

Simple Analogy

Airlines learned long ago that investigating accidents without blame makes flying safer, because pilots then report near-misses freely. Software teams gain the same benefit when they treat experiment findings as shared lessons.

i
Leaders Set the Tone

When a manager asks “who caused this?” the program dies. When a manager asks “what did we learn and what will we fix?” the program thrives.

32Security-Flavored Failure Injection

The same ideas can test how the cluster behaves when part of it is misbehaving or compromised.

Failure injection is usually about accidents, but the same method can test security assumptions. What happens if a pod suddenly tries to connect to places it never should? What if a credential is revoked while a service is running? What if outbound internet access is blocked? These experiments check that your protective controls work and that your applications fail safely when those controls trigger.

Test 1

Block outbound traffic

Cut external access for a service and see whether it fails clearly, and whether hidden dependencies on the internet appear.

Test 2

Revoke a credential

Invalidate a secret in a test environment and check that applications refresh or fail safely, and that alerts fire.

Test 3

Unexpected connection attempts

Have a test pod try to reach services it should not, and check that network rules block it and that monitoring notices.

Test 4

Policy violation attempts

Try to deploy a workload that breaks your rules and confirm that admission policy rejects it clearly.

Simple Analogy

A bank occasionally sends a trusted tester to try the vault door and the alarm. The goal is not to steal, but to confirm that the lock holds and the alarm rings. Security-flavored experiments are the trusted tester.

!
Coordinate With Security Teams

Security-flavored experiments can trigger real incident alarms. Tell the security team in advance, run them in agreed windows and use test accounts and test data only.

33A Starter Catalog of Experiments

If you are not sure where to begin, this ordered list moves from gentle to demanding.

OrderExperimentWhere to RunMain Lesson
1Delete one pod of a stateless serviceTest environmentReplacement speed and graceful shutdown
2Fail readiness on one podTest environmentTraffic shifts away from unready pods
3Drain one nodeTest, then stagingDisruption budgets and rescheduling
4Add modest network delay to one dependencyStagingTimeouts and user experience
5Stress memory in one podStagingLimits, restarts and neighbor protection
6Make DNS lookups slow for one serviceStagingCaching and hidden name dependencies
7Roll out a deliberately broken versionStagingRollout safety and rollback speed
8Fail the leader of a replicated data storeStaging with copied dataElection time and client reconnection
9Remove a whole zone worth of nodesStaging, then production game daySpread, capacity and storage constraints
10Partition the network between two groupsStagingSafe behavior of stateful systems
11Slow or stop the policy webhookTest clusterDependency of deployments on admission components
12Restore a backup into a clean environmentIsolated environmentWhether recovery truly works
Simple Analogy

A driving instructor begins in an empty parking lot, moves to quiet streets and only then to the highway. The list above is the same gentle road from parking lot to highway.

i
Skip Nothing Early

The first few experiments seem trivial, yet they often uncover the most embarrassing and valuable weaknesses, such as a service running with a single replica.

34Design Patterns and Anti-Patterns

Experienced teams keep meeting the same good and bad shapes. Learn them early.

Patterns that work

Pattern 1

Hypothesis first

Every experiment begins with a written prediction about steady state.

Pattern 2

Small then big

Climb the ladder of blast radius one rung at a time.

Pattern 3

Automatic abort

Link every experiment to user-facing signals that stop it on their own.

Pattern 4

Fix, then rerun

After repairing a weakness, run the same experiment again to prove the fix.

Pattern 5

Incidents become experiments

Turn every real outage into an automated test so it cannot return unnoticed.

Pattern 6

Opt-in and ownership

Only owners who are ready are targeted, and they take part in the design.

Patterns that hurt

ANTI-PATTERN-03 Avoid
Problem

Running random destruction with no hypothesis, no measurement and no owner.

Why It’s Harmful

Nothing is learned, people lose trust and the effort is dismissed as vandalism.

Correct Approach

Plan each experiment around a question, measure the result and involve the service owner.

ANTI-PATTERN-04 Avoid
Problem

Starting with production and the biggest possible fault to look impressive.

Why It’s Harmful

A surprise outage damages customers and ends executive support for the whole program.

Correct Approach

Earn production access through a record of safe, well-measured smaller experiments.

ANTI-PATTERN-05 Avoid
Problem

Finding problems and never fixing them.

Why It’s Harmful

Teams stop believing the program has value, and the same weakness appears again in a real incident.

Correct Approach

Track every finding as work with an owner and a date, and review progress regularly.

ANTI-PATTERN-06 Avoid
Problem

Testing only pod deletion and declaring the system resilient.

Why It’s Harmful

Real outages come from networks, dependencies, configuration and capacity, none of which a pod kill tests.

Correct Approach

Cover every layer of the stack with a balanced set of fault types.

35Best Practices and Common Mistakes

A short checklist of habits that separate calm, valuable programs from risky ones.

Best Practices

  • Define steady state with user-facing signals before anything else
  • Write a one-page card for every experiment
  • Limit blast radius by label, namespace, percentage and time
  • Use automatic abort conditions and tested stop buttons
  • Run experiments during working hours with owners present
  • Record results and track fixes to completion
  • Rerun experiments after fixes and automate the valuable ones

Common Mistakes

  • Skipping the baseline measurement
  • Running faults with no maximum duration
  • Surprising service owners
  • Giving the chaos tool excessive permissions
  • Running stateful experiments without fresh backups
  • Ignoring discoveries instead of fixing them
  • Never testing alerts and rollback procedures

Three questions before pressing the button

1

What do we expect to happen?

If nobody can say, the experiment is not ready.

2

How will we know it went wrong, and how will we stop?

Signals and abort conditions must be agreed in advance.

3

What is the worst realistic outcome?

If the worst case is unacceptable, shrink the blast radius or move to a safer environment.

i
Boring Is the Goal

A mature chaos program feels quiet. Experiments are small, expected and well understood, and passing results are routine. Drama usually signals missing preparation.

36When an Experiment Goes Wrong

Even careful plans meet surprises. Knowing the usual problems makes them easy to handle.

Problem 1: The fault did not seem to do anything

First confirm that the targets were selected as expected. A typo in a label or a wrong namespace is the most common cause. Next check whether the tool reported the fault as applied. Then verify the fault from the inside, for example by measuring latency between the affected pods. Finally consider that the system may simply be resilient to this fault, which is a perfectly good result.

Problem 2: The fault would not stop

Use the manual stop button first, then delete the experiment resource. If effects remain, check the node helper programs on the affected nodes and restart them if needed. Inspect for leftover network rules, stress processes or edited settings. This is why every experiment needs a documented cleanup procedure and why faults should have short built-in durations.

Problem 3: The damage was larger than expected

Abort at once and restore service. Then run a blameless review. Ask which assumption was wrong: the dependency graph, the capacity estimate or the abort threshold. The lesson usually reveals a hidden coupling that was worth discovering, even if the way it was discovered was uncomfortable.

Problem 4: The results are confusing

Check whether something else changed at the same time, such as a deployment, a traffic spike or a scheduled job. Repeat the experiment under calmer conditions. Make sure your baseline was captured and that time clocks on dashboards line up with the experiment’s timeline.

Symptom

No visible effect

Check targets, tool status and inside measurements.

Symptom

Fault will not end

Stop button, delete resource, then check node helpers and leftovers.

Symptom

Unexpected damage

Abort, restore, then review the wrong assumption without blame.

Symptom

Confusing data

Look for overlapping changes and repeat under calmer conditions.

Simple Analogy

When a science experiment gives a strange result, scientists first check the equipment, then the setup, then repeat the test. They do not throw away the laboratory. The same patience applies to chaos experiments.

i
Practice the Cleanup

Include a cleanup drill in your first game day. When everyone knows how to remove every kind of fault, running experiments feels far safer.

37Real-World and Industry Examples

Different industries focus on different failures, because their customers care about different things.

Streaming media: surviving the loss of a large share of capacity

The pioneers of the practice built tools that remove machines and even whole regions on purpose, so that every team designs services that expect loss. Their motto is to assume failure is normal and to prove the system handles it.

Online retail: protecting checkout during peak season

Shops rehearse slow payment providers, lost search services and busy databases before the busiest shopping weeks. They test fallbacks such as showing cached recommendations and queuing orders, and they run game days with the entire on-call team.

Financial services: proving recovery to regulators

Banks use experiments to demonstrate that critical systems recover within agreed times after zone or data store failures. The recorded experiments become evidence for auditors and for regulators who ask for operational resilience.

Telecommunications: very high availability targets

Operators test node and network failures continuously in staging copies of their networks, and use strict abort rules, because service expectations are measured in tiny fractions of allowed downtime.

Software-as-a-service platforms: continuous small experiments

Many platform companies run gentle experiments constantly during working hours, with automatic abort, so that new code and new dependencies never quietly weaken resilience.

“Hope is not a strategy, but a tested recovery is.”

38Pattern: Failing the Platform Components

Applications depend on shared platform pieces such as ingress, load balancers and the network plugin, and those can fail too.

Between your users and your pods sit several shared components. An ingress controller receives requests from the outside and routes them to services. A load balancer in the cloud spreads traffic across nodes. A network plugin gives every pod an address and moves packets between them. A service mesh adds proxies and a control component that configures them. These pieces are run by a platform team, and a failure in one of them can hurt every application at once, so they deserve their own experiments.

ComponentFault to InjectWhat You Want to Learn
Ingress controllerRemove one or all of its podsWhether external traffic keeps flowing through the remaining replicas and how quickly capacity returns
Cloud load balancerMake one backend node unhealthyWhether health checks stop sending traffic to the bad node quickly
Network plugin agentStop the agent on one nodeWhether pods on that node keep communicating and how new pods behave
Service mesh control componentMake it unavailable for a short timeWhether existing proxies keep serving with their last known settings
Certificate managerStop it before a renewal is dueWhether alerts warn you before certificates expire
Monitoring and logging stackSlow or stop itWhether applications stay healthy when observability itself is down
Simple Analogy

A shopping mall has shared escalators, doors and security desks used by every shop. If the main entrance jams, every shop loses customers at once, no matter how good each shop is. Platform experiments check the mall’s shared doors.

The control-plane-versus-data-plane idea

Networking tools often have two halves. The data plane is the part that carries real traffic, such as proxies and routers. The control plane is the part that tells the data plane what to do. A well-designed system keeps carrying traffic even when its control plane is unavailable, because the data plane remembers its last instructions. A key question for many experiments is therefore whether the data plane really survives without its control plane.

Example: The silent ingress dependency

A team removes two of three ingress pods during a game day. Traffic continues, but the remaining pod runs hot and requests slow down. The team learns that their ingress needs at least five replicas spread across zones and that autoscaling for ingress was never configured.

!
Wide Blast Radius

Platform component experiments can affect every team at once. Announce them widely, start in test clusters and involve the platform owners directly.

39A Walkthrough: One Experiment from Start to Finish

Let us follow a single imaginary experiment through every step, so the ideas become concrete.

A small online shop runs a web front end, an order service, a payment service and a database in a Kubernetes cluster. The team is worried about the payment service. It is run by another team, and it has been slow a few times. They decide to find out what happens to orders when payments become slow.

1

Define the steady state

The team chooses two signals: ninety-nine percent of order requests succeed, and ninety-five percent of them finish within two seconds. They record a baseline for one hour of normal traffic in staging.

2

Write the hypothesis

“Even when calls to the payment service take an extra two seconds, orders will still succeed, and the front end will show a friendly waiting message.”

3

Choose the fault and the blast radius

They add two seconds of delay to calls from the order service to the payment service, affecting only one in four order pods in staging, for five minutes.

4

Set the abort conditions

If the order success rate drops below ninety-five percent for sixty seconds, the experiment stops automatically. The facilitator also holds a manual stop button.

5

Run and observe

The delay begins. Within thirty seconds the dashboard shows order latency rising. At ninety seconds, the success rate begins to fall, and the abort rule fires at the end of the third minute.

6

Analyze

Traces show that the order service waits for payment with no timeout, so every worker thread eventually sits idle waiting. Once all threads are busy, even orders unrelated to payment are refused.

7

Fix and prove

The team adds a three-second timeout, a limit on simultaneous payment calls and a message that tells customers payment is slow. They rerun the same experiment and the steady state holds.

8

Automate and share

The experiment is saved as an automated check in the delivery pipeline, and the card is shared with the payment team and others who call that service.

Simple Analogy

It is like testing a new fire door by closing it on a quiet afternoon. You see that it sticks, you fix the hinge, you test it again, and you write a note for the maintenance schedule. The same small cycle of try, learn, fix and repeat applies to every experiment.

i
What This Story Shows

The weakness was not in Kubernetes. It was a missing timeout in an application, found safely in staging in under an hour. That is exactly the kind of discovery failure injection exists to produce.

40Measuring the Value of Your Program

To keep support and funding, show that failure injection makes the business measurably safer.

Leaders often ask whether chaos engineering is worth the effort. The answer lies in a few simple measurements tracked over time. Some measure the work done, some measure what was learned and some measure real outcomes in production. The most persuasive reports connect experiments to incidents that did not happen, or incidents that were shorter than they would have been.

Measure 1

Coverage

How many critical services have at least one experiment, and how many layers of the stack are tested.

Measure 2

Findings and fixes

How many weaknesses were discovered, how many were fixed and how long fixes took.

Measure 3

Time to detect and recover

How quickly alerts fire and how quickly the team restores service, during experiments and during real incidents.

Measure 4

Repeat incidents

How often a past cause returns. A good program makes repeats rare.

Fewer
Surprise outages from known weaknesses
Shorter
Time to detect and recover
Calmer
On-call experience for the team
Simple Analogy

A gym measures progress by how many people attend, how much weight they lift and how few injuries occur. No single number tells the story, but together they show whether the training works. Program metrics play the same role for resilience.

!
Do Not Reward the Wrong Number

If teams are rewarded for the number of experiments run, they will run trivial ones. Reward weaknesses found and fixed, and the shrinking of detection and recovery time.

41Frequently Asked Questions

Short, direct answers to the questions people ask most often when they first meet failure injection.

Q1Is it safe to run chaos experiments in production?

It can be, once you have a measured steady state, small blast radius, automatic abort rules, observability and a history of safe experiments in lower environments. Beginners should start in test and staging.

Q2Do I need a special chaos tool to begin?

No. Deleting pods, draining nodes and scaling workloads need nothing extra. Dedicated tools add more fault types, schedules and safety controls when you outgrow the basics.

Q3How is this different from ordinary testing?

Ordinary tests check that features work. Failure injection checks how the whole running system behaves when parts fail, including real infrastructure, real networks and real human response.

Q4What should I measure during an experiment?

User-facing signals first, such as success rate, latency and business outcomes, supported by internal signals such as the number of ready pods and error logs.

Q5How often should experiments run?

Start with a game day each quarter and move toward automated experiments in pipelines and on schedules, so that resilience is checked after every meaningful change.

Q6What if an experiment finds nothing wrong?

That is a useful result. It records evidence that the system handles that fault, and it lets you move on to a harder one. Save it as a regression test.

Q7Which failures should I test first?

The ones that worry you most and are most likely, such as losing a pod, losing a node, a slow dependency and a bad rollout. Use the starter catalog in this guide as a guide.

Q8Can chaos tools themselves be dangerous?

Yes. They need strong permissions to do their job. Restrict who can create experiments, which namespaces can be targeted and which fault types are enabled, and treat the platform as high-privilege infrastructure.

Q9How do I get my organization to agree?

Begin with a small, safe experiment in a non-critical service and share the lessons. Link the work to outage cost, error budgets and customer trust, and invite skeptics to join the first game day.

Q10Does failure injection replace backups and disaster recovery plans?

No. It tests them. A backup or recovery plan that has never been exercised cannot be trusted, and experiments are how you turn a written plan into a proven one.

Q11Should every team run experiments on their own services?

Ideally yes, with shared tooling, shared guidelines and central safety rules. Service owners understand their systems best, and shared standards keep everyone safe.

Q12What is the single most valuable habit?

Writing a hypothesis and a measurable steady state before every experiment. It turns random breaking into learning.

42Summary and Key Takeaways

Failure injection replaces hope with evidence. By breaking things deliberately, in small controlled ways, teams discover how their Kubernetes systems really behave when pods vanish, nodes die, networks slow down, names stop resolving, disks fill, configurations go wrong and control components stumble. The method is scientific: define a steady state, form a hypothesis, inject a realistic fault, measure the difference and fix what you learn. The craft lies in keeping the blast radius small, having automatic ways to stop, observing carefully and treating every finding as a shared lesson. Done well, it makes systems stronger, people calmer and outages shorter.

Key Takeaways

  • Experiments, not vandalism — every injection starts with a steady state, a hypothesis and a measurable result, so that each run teaches something.
  • Test every layer — pods, nodes, zones, networks, DNS, resources, dependencies, storage, configuration, time, probes, webhooks and capacity can all fail in different ways.
  • Control the blast radius — use labels, namespaces, percentages, short durations and traffic scoping, and climb from small to large one step at a time.
  • Build in safety — give every fault a short maximum duration, automatic abort rules tied to user-facing signals, a tested stop button and a rollback plan.
  • You are testing defenses — timeouts, retries with backoff, circuit breakers, fallbacks, bulkheads and graceful shutdown are what experiments reveal as strong or weak.
  • Treat the tooling as privileged — restrict who can run experiments and where, require opt-in from service owners, and keep an audit trail.
  • Automate and keep learning — move from ad hoc tests to game days, pipelines and scheduled experiments, turn incidents into permanent tests, and keep the culture blameless.