# Why can adding a label through commonLabels make kubectl apply fail for an existing Deployment?

Kustomize, Medium (Advanced), Troubleshooting. https://k8wiz.com/uquiz/why-can-adding-a-label-through-commonlabels-make-kubectl-apply-fail-for-an-existing-deployment

- A. It removes every label the Deployment already had before the build
- B. It renames the Deployment, which forces Kubernetes to create a whole new one
- C. It also adds the label to selectors, which can't change on a Deployment
- D. It labels the Pods only, so the Deployment's selector stops matching

**Answer:** It also adds the label to selectors, which can't change on a Deployment

**Explanation:** commonLabels adds its labels to resources, selectors and pod templates. A new label changes spec.selector, which Kubernetes rejects on an existing Deployment. commonLabels is deprecated in favor of the labels field, which leaves selectors alone unless you ask for them.
