Kustomize
Medium
Troubleshooting
With Kustomize v5.8, a kustomization sets namespace: shop and renders a chart whose Deployment template has no metadata.namespace. What namespace does the built Deployment get?
Select your answer:
Show answer and explanation
Answer: None, metadata.namespace stays unset
Explanation
Since v5.8.0 Kustomize passes the namespace to Helm with --namespace but skips chart output in the namespace transformer. helm template doesn't add a namespace the template doesn't write, so the field stays empty. Charts that use .Release.Namespace in their templates get shop, and kubectl apply -n can fill the gap for the rest.
More medium Kustomize questions
- Why can adding a label through commonLabels make kubectl apply fail for an existing Deployment?
- How do you add a label to every resource without changing any selectors?
- What does an images entry with name: nginx and a digest: sha256:... value do?
- A strategic merge patch lists one container with a new image. What happens to the base's other containers?
- How do you remove a container from a base Deployment with a strategic merge patch?
- When is a JSON 6902 patch a better choice than a strategic merge patch?