Apply shared metadata to all resources.
Section: Kustomize Basics
Set namespace and common labels
yaml
yaml
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: prod
commonLabels:
app.kubernetes.io/part-of: storefrontLearn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Kustomize Basics
Apply a kustomization directory
Use kubectl's built-in Kustomize support.
Rewrite image tags in overlay
Update images without editing base manifests.
Generate ConfigMap from literals
Create config objects as part of the build.