How the OR expression can be used with selectors and labels?
selector:
app: myapp
tier: frontendThe above matches pods where labels app==myapp AND tier=frontend.
But the OR expression can be used?
app==myapp OR tier=frontend?
OR isn't supported in your case.
You can try the set-based label selector. Refer to the following link, https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#resources-that-support-set-based-requirements
Now you can do that :
kubectl get pods -l 'environment in (production, qa)'https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#list-and-watch-filtering