The controller returns the system to the desired state
Pod and Deployment
A Pod is a temporary application instance. A Deployment manages ReplicaSets, and a ReplicaSet maintains the specified number of Pods. Deleting an individual Pod does not change the controller's desired replica count.
Recovery takes time
The controller detects the mismatch and creates a replacement; the scheduler finds space, and kubelet starts the containers. Readiness may delay admission to traffic. This is a sequence of actions, not an instant resurrection of the previous Pod.
Why spare replicas matter
Two replicas at 200 operations/s each exactly cover 400. Losing one leaves only 200. A third replica maintains enough capacity while the replacement starts; the controller and spare capacity solve different problems.
Experiment boundaries
We lose one Pod at 21 s and combine replacement preparation into a single delay. In reality, Node failure, the image, resource restrictions, and probes have separate effects. Compare the first seconds of failure with the final number of ready replicas.
Task
At second 21, one Pod disappears. Maintain 400 operations/s and restore the desired replica count within three seconds.
All Pods are initially ready. At 21 s, one disappears. Without Deployment it does not return. With a controller, its replacement becomes ready after the configured delay. Node failures, image startup and network delays are combined into an educational recovery delay.
- Add a Deployment.
- Provide spare capacity for the loss of one Pod.
- Check recovery and all traffic over 60 s.