<p>I have this Deployment object:</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
  name: deployment-webserver-nginx
  annotations:
    description: This is a demo deployment for nginx webserver 
  labels:
    app: deployment-webserver-nginx
spec:
  replicas: 3
  selector:
    matchLabels:
      app: deployment-webserver-pods
  template:
    metadata:
      labels:
        app: deployment-webserver-pods
    spec:
      containers:
      - name: nginx
        image: nginx:alpine
        ports:
        - containerPort: 80
</code></pre>
<p>My understanding on this Deployment object is that any Pod with <code>app:deployment-webserver-pods</code> label will be selected. Of course, this Deployment object is creating 3 replicas, but I wanted to add one more Pod explicitly like this, so I created a Pod object and had its label as <code>app:deployment-webserver-pods</code>, below is its Pod definition:</p>
<pre><code>apiVersion: v1
kind: Pod
metadata:
  name: deployment-webserver-nginx-extra-pod
  labels:
    app: deployment-webserver-pods
spec:
  containers:
  - name: nginx-alpine-container-1
    image: nginx:alpine
    ports:
      - containerPort: 81
</code></pre>
<p>My expectation was that continuously running Deployment Controller will pick this new Pod, and when I do <code>kubectl get deploy</code> then I will see 4 pods running. But that didn't happen.</p>
<p>I even tried to first create this pod with this label, and then created my Deployment and thought that maybe now this explicit Pod will be picked but still that didn't happen.</p>
<p>Doesn't Labels and Selectors work like this?
I know I can scale by deployment to 4 Replicas, but I am trying to understand how Pods / other Kubernetes objects are selected using Labels and Selectors.</p>

<p>From the <a href="https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#selector" rel="nofollow noreferrer">official docs</a>:</p>
<blockquote>
<p>Note: You should not create other Pods whose labels match this
selector, either directly, by creating another Deployment, or by
creating another controller such as a ReplicaSet or a
ReplicationController. If you do so, the first Deployment thinks that
it created these other Pods. Kubernetes does not stop you from doing
this.</p>
</blockquote>
<p>As described further in docs, it is not recommended to scale replicas of the deployments using the above approach.</p>
<hr>
Another important point to note from same section of docs:
<blockquote>
<p>If you have multiple controllers that have overlapping selectors, the
controllers will fight with each other and won't behave correctly.</p>
</blockquote>
