<p>I wonder if it is possible to change labels of pods on the fly so services route requests to those pods based on new labels.</p>

<p>For example I have two services A and B. Then I have 10 pods, where 5 have label type = A (matches service A) and the other 5 have label type = B (matches service B). At some point I want to change labels on pods to achieve a configuration of 2 with label type = A and 8 with label type = B.</p>

<p>I want to know if I can just change the labels and services will be updated accordingly without having to stop and start new pods with different labels.</p>

<p>You can change the labels on individual pods using the <code>kubectl label</code> command, documented <a href="https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#label" rel="nofollow noreferrer">here</a>.</p>
<p>Changing the label of a running pod should not cause it to be restarted, and services will automatically detect and handle label changes.</p>
<p>So in other words, yes you can :)</p>
