kustomize "trouble configuring builtin ... plugin" in CI
kustomize configures its builtin transformers and generators from your kustomization fields. "trouble configuring builtin ... plugin" means one of those fields is malformed, misnamed, or has the wrong shape for the plugin it feeds.
What this error means
kustomize build fails with "trouble configuring builtin PatchTransformer with config: ..." or a similar plugin name, followed by a YAML unmarshal error.
Error: trouble configuring builtin PatchTransformer with config:
```
path: patch.yaml
targets: {kind: Deployment}
```
: unable to parse SM or JSON patch from [patch.yaml]Common causes
A misnamed or mis-typed field
A field like targets instead of target, or a scalar where a list is expected, cannot be unmarshalled into the builtin plugin config.
A patch file that is neither strategic-merge nor JSON6902
The referenced patch is not a valid strategic-merge or JSON6902 patch, so the transformer cannot parse it.
How to fix it
Use the correct field name and shape
- Read which builtin plugin and field the message names.
- Correct the field to the documented spelling and type.
- Ensure a referenced patch is a valid SM or JSON6902 patch.
patches:
- path: patch.yaml
target:
kind: Deployment
name: apiValidate the kustomization structure
Run the build on just the offending directory to isolate which field the plugin rejects.
kustomize build overlays/prod 2>&1 | head -30How to prevent it
- Follow the exact field names in the kustomization schema.
- Keep patches valid strategic-merge or JSON6902 documents.
- Build overlays in CI to catch config errors before apply.