Making the Application Fault-Tolerant
Explore how to improve fault tolerance in Kubernetes applications by replacing Pods with Deployments. Understand how Deployments use ReplicaSets to keep the desired number of Pods running, ensuring your app recovers automatically when instances are destroyed. This lesson helps you validate fault tolerance through practical chaos experiments.
How can we make the application fault-tolerant?
Now, we have a decent experiment that is validating whether our Pod is in the correct state, whether it is under the right conditions, and whether it exists. Then, it destroys the Pod, only to repeat the same validations of its state. The experiment confirms something that you should already know. Deploying a Pod by itself does not make it fault-tolerant. Pods alone are not even highly available. They’re not many things. However, what interests us, for now, is that they are not fault-tolerant. We confirmed this through the experiment.
We did something that we shouldn’t do; we deployed a Pod directly, instead of using some higher-level constructs in Kubernetes. That was intentional. I wanted to start with a few simple experiments and progress over time towards more complex ones. I promise that I will not make the same ridiculous ...