[No Audio]
Let's understand controller objects one by one.
We will start with ReplicaSets.
ReplicaSets are higher unit of orchestration compared to Pods,
which means they will supervise the Pods.
The purpose is pretty obvious. As mentioned earlier,
they scale Pods, or they manage the number of
Replicas of a Pod. We can increase or decrease the
number of Replicas of a Pod using ReplicaSet.
Pods are given labels and ReplicaSets are given
selectors to keep track of which Pods to supervise.
It is also possible to provide pod
definition along with ReplicaSets. It would mean
that creation of those pods will also be managed
by ReplicaSet. If you do so, you need to provide
Pod specs as Pod template to the YAML file of ReplicaSet.
While they are quite useful, standard
practice doesn't involve using ReplicaSets directly.
They are used under supervision of
deployment, which we will learn soon enough.