Kustomize
Medium
Concepts
An overlay sets namePrefix: prod- and includes a component that adds a PodDisruptionBudget named web. What is the PodDisruptionBudget called in the output?
Select your answer:
Show answer and explanation
Answer: prod-web, because the overlay's transformers run after its components
Explanation
Kustomize loads an overlay's resources, runs its generators, then processes its components, and only then runs the overlay's own transformers such as namePrefix. By that point the component's PodDisruptionBudget is part of the set, so it gets the prefix like every other resource.
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?