Kustomize
Medium
Troubleshooting
An overlay lists a component directory under resources instead of components. What happens when you build it?
Select your answer:
Show answer and explanation
Answer: The build fails with an error saying the kind must not be Component
Explanation
Kustomize checks each directory's kind against the field it's listed in. A directory of kind Component under resources fails with "expected kind != 'Component' for path ...". Components only work from the components field, where they run on the overlay's gathered resources.
More medium Kustomize questions
- A component's kustomization.yaml has no kind line, and an overlay lists it under components. What happens?
- An overlay sets namePrefix: prod- and includes a component that adds a PodDisruptionBudget named web. What is the PodDisruptionBudget called in the output?
- 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?