Preparing for Termination of Instances
In this lesson, we will set up a new ConfigMap, create a namespace, define a ServiceAccount, and also explore a CronJob that we will later use for the experiment.
We'll cover the following
Now we have metrics stored in Prometheus, and we can visualize them using Grafana and Kiali. We should be ready to create even more mayhem than before.
What can we do?
Let’s not introduce anything drastically new. Let’s destroy a Pod. Now you might say, “Hey, I already know how to destroy a Pod. You showed me that.” If that’s what you’re thinking, you’re right. Nevertheless, we are going to terminate, but, this time, we are not going to target a specific app. We are going to destroy a completely random Pod in the go-demo-8
Namespace.
You will not see a significant difference between destroying a Pod of the go-demo-8
application and destroying a completely random Pod from the go-demo-8
Namespace. We are not running much in that Namespace right now. But, in a real-world situation, you would have tens, or even hundreds of applications running in, let’s say, the production Namespace, In such a case, destroying a Pod selected randomly among many applications could have quite unpredictable effects. But, we don’t have that many. We have only three apps (repeater
, go-demo-8
, and MongoDB). Still, even with only those three, randomizing which Pod will be terminated might result in unexpected results.
We’ll leave speculations for some other time, and we’ll go ahead and destroy a random Pod.
Inspecting the ConfigMap defined in experiments-any-pod.yaml
As always, we’ll start by taking a quick look at the definition we’re going to apply.
Get hands-on with 1400+ tech skills courses.