title: k8s - Why we need ReplicaSet when we have Deployments
body: <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>