Operating ReplicaSets

In this lesson, we will explore the operating procedure of ReplicaSets and see its self-healing property in action.

Deleting ReplicaSets

What would happen if we delete the ReplicaSet? As you might have guessed, both the ReplicaSet and everything it created (the Pods) would disappear with a single kubectl delete -f rs/go-demo-2.yml command.

However, since ReplicaSets and Pods are loosely coupled objects with matching labels, we can remove one without deleting the other.

We can, for example, remove the ReplicaSet we created while leaving the two Pods intact.

Get hands-on with 1200+ tech skills courses.