How does kustomize commonLabels exclude adding labels to selectors

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

commonLabels:
someName: someValue
owner: alice
app: bingo

1 Like

Now labels should be used for that use case. You can select whether the kustomize adds labels to selectors and templates.

Labels transformer also allows you not to add labels to selector with commonLabels, but it requires more complicated config.