<p>In my <code>Deployment</code>, i specify 2 replicas for my application, but when i look at the result generated by kubernetes, it has 3 <code>ReplicaSet</code>, in my <code>Deployment</code> i don't specify anything related to <code>ReplicaSet</code>, why is that?</p>
<p><a href="https://i.stack.imgur.com/8kfjJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8kfjJ.png" alt="enter image description here" /></a></p>

hades
<p>Those are previous revisions of your deployment. Notice the little &quot;rev1&quot;, &quot;rev2&quot; labels. Kubernetes retains old replicaSets, per default 10 revisions are stored.</p>
<p>Only the latest revision has your two pod <code>replicas</code> in the <code>replicaSet</code>. You can set the cleanup policy using <code>.spec.revisionHistoryLimit</code> according to the <a href="https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#clean-up-policy" rel="nofollow noreferrer">kubernetes documentation</a>.</p>
