kubectl set selector changes the label selector on a Kubernetes Service. The selector determines which pods receive the Service’s forwarded traffic, so changing it can redirect clients between application versions. section 11.1.2
Redirect the quiz Service
A quiz Service initially selects pods labeled app=quiz and rel=stable. To include quiz pods without the stable-release label, run: kubectl set selector service quiz app=quiz. Kubernetes reports service/quiz selector updated. Verify the result with kubectl get svc -o wide. section 11.1.2
