<p>I have some older ReplicaSets that were manually created by me, so they are not bound to/managed by a Deployment.  </p>

<p>Is it possible to create the Deployments now, in a way that no new ReplicaSets will be created and the Deployments will automatically pair with the existing Replicasets and Pods?</p>

<p>I know I could delete the existing ReplicaSets, but I'm trying to find another way. I tried to give the new Deployment the same <code>selector</code> and <code>matchLables</code> as the existing ReplicaSet, but that didn't work and the Deployment created a new ReplicaSet and Pod.</p>

<p>Thanks!</p>

Daniel
<p>The <a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#deployment-v1-apps" rel="nofollow noreferrer">Deployment</a> resource specification does not expose any fields for specifying the initial ReplicaSet. So, the logic of creating a new ReplicaSet seems to be hardcoded in the Deployment controller.</p>

<p>So, the answer is, you can't do it. If you really wanted to have a Deployment where you can specify the ReplicaSet, you could create a Custom Resource Definition (CRD) and operator.</p>
