Self-healing

Now let's test the magic powers of the self-healing of the ReplicaSet by randomly killing one of its pods and observing what's going to happen. Let's delete the first pod from the previous list:

$ kubectl delete po/rs-web-6qzld
pod "rs-web-6qzld" deleted

And then, let's list all pods again. We expect to see only two pods, right? Wrong:

List of pods after having killed a pod of the ReplicaSet

OK, evidently the second pod in the list has been recreated as we can see from the AGE column. This is auto-healing in action. Let's see what we discover if we describe the ReplicaSet:

Describe the ReplicaSet

And indeed, we find an entry under Events that tells us that the ReplicaSet created the new pod rs-web-q6cr7.