<p><a href="https://i.stack.imgur.com/bd6P3.jpg" rel="nofollow noreferrer">enter image description here</a>I don't' see why adding selector when we are creating <strong>replicaSet</strong> I thought maybe we can select different pod but we can't so I don't see what is used for</p>
<pre><code>apiVersion: apps/v1
kind: ReplicaSet
metadata:
    name: rs-name
spec:
    replicas: 2
    selector: // here the selector
        matchLabels:
            podptr: my-pod-l
    template:
        metadata:
            name: pods-name
            labels:
                podptr: my-pod-l // here it's lable
        spec:
            containers:
                - name: cons-name
                  image: nginx
                  ports:
                      - containerPort: 50
</code></pre>

<p>Because you can have more than one label on the resulting pods and it doesn't know which of them to use for tracking. The selector labels are read-only once initialized, but other labels you can add and remove as needed for other purposes.</p>
