Kustomize
Hard
Troubleshooting
Why can a kustomization build with the kustomize CLI but fail with kubectl apply -k?
Select your answer:
Show answer and explanation
Answer: kubectl bundles a fixed Kustomize version, which may be older than the CLI
Explanation
Each kubectl release ships one Kustomize version. Fields added in newer Kustomize releases, or changed behavior, make the two disagree. Use the same tool and version in CI and in production.
More hard Kustomize questions
- Why does generatorOptions.immutable: true work well with Kustomize's default hash suffix?
- Why can a component patch resources defined in the overlay that includes it, when a base can't?
- Which field path selects the value of the env var SERVICE_HOST in the container named app, for a replacement target?
- A production overlay lists a remote base with ?ref=main. What's the risk?
- A strategic merge patch adds one item to a list in a custom resource, but the build replaces the whole list. Why?
- A custom resource refers to a generated ConfigMap by name, but after the build it still uses the name without the hash suffix. Why?