Hi All, When we add new label to pod template in deployment yaml, do we need to . . .

ömer sönmez:
Hi All,
When we add new label to pod template in deployment yaml, do we need to add this label also to selector of deployment? It seems working but i cann’t decide if it has side effects or not?

unnivkn:
create a service for that deployment & see if its giving any side effect

ömer sönmez:
it is not. thx

unnivkn:
try to create a service using, only the newly added label in the pod template.

Sangeetha Radhakrishnan:
The deployment will work even if a single pod label matches. Does not require all labels of a pod to match. Only you need to see if any other pod has same label then you can use more than one label in the deployment selector to match exact.

ömer sönmez:
@unnivkn the service with the new pod label as selector is also working fine.