<p>I am new to kubernetes and microservices, there are 2 objects, <a href="https://kubernetes.io/docs/concepts/workloads/controllers/deployment/" rel="noreferrer">Deployments</a> and <a href="https://kubernetes.io/docs/concepts/workloads/controllers/replicaset/" rel="noreferrer">ReplicaSet</a>.</p>

<p>I can't wrap my head around even after reading its documentations and other articles.</p>

<p>If we have <code>Deployments</code>, why do we need a <code>ReplicaSet</code> because you can specify the replicaset in the <code>Deployment</code>. And when i delete the pods, new pods will be spawned based on the replicaset, just like the deployments.</p>

<p>Like what is the actual use-case where we only need <code>ReplicaSet</code> but not <code>Deployments</code></p>

hades
<p>Deployment works one level above ReplicaSet object. Deployment is recommended for application services.</p>

<p>With deployment you should be able to do rolling upgrade or rollback. You can update image from v1 to v2.</p>

<p>With ReplicaSet you define number of replicas you want to run. For a particular service. You would have those many replicas running.</p>
