k8wiz
Kustomize
Hard
Mutation

When kustomize edit fix moves commonLabels into labels, which setting does it give the new labels entry?

Select your answer:

Show answer and explanation

Answer: includeSelectors: true

Explanation

commonLabels adds its labels to selectors and pod templates as well as metadata. Setting includeSelectors: true keeps that behavior, so the build output doesn't change and existing Deployments don't hit an immutable selector error on the next apply.

Read more about Kustomize