Use with Kustomize and Helm¶
Kubesplit reads from STDIN, so it drops straight into a pipeline behind any tool that renders a multidoc Kubernetes stream — most commonly kustomize and helm. This turns a single opaque render into a reviewable tree of one-resource-per-file.
Pass - (or nothing) as the input and let kubesplit read the piped stream; give it an output directory with -o/--output.
With Kustomize¶
Or with kubectl's built-in kustomize:
With Helm¶
helm template my-release my-chart \
--namespace target-ns \
--values config.yml \
| kubesplit --no-quotes-preserved --input - --output generated/prod
Keep the output directory in sync¶
When you re-render after a change, add -c/--clean-output-dir so that files for removed resources don't linger:
Warning
--clean-output-dir recursively deletes the output directory before writing. Point it only at a directory dedicated to generated output.
Next steps¶
- Tune the emitted YAML in Tune the YAML formatting.
- Understand the resource detection and ordering in How kubesplit works.
- Read why teams split their renders (reviewable diffs, apply order, consistent formatting) in Ecosystem.