A command-line tool to split or merge Kubernetes manifests.
Splinter simplifies working with large Kubernetes manifests.
It helps in scenarios where you need to:
- Break down large manifests into manageable, individual files organized by resource type
- Generate a
kustomization.yaml
to glue the individual files together
Or...
- Recombine the individual files back into a single manifest
go install github.com/kdwils/splinter@latest
Download the latest binary from GitHub Releases
Command | Description |
---|---|
split |
Split a single manifest into multiple files organized by resource kind |
merge |
Merge multiple manifest files into a single output (prints to stdout by default) |
Flag | Short | Required | Description |
---|---|---|---|
--include |
-i |
No | Files or directories to include |
--output |
-o |
No | Output directory/file path |
With the include flag
splinter split -i examples/merged/merged.yaml -o examples/split/
With an argument
splinter split examples/merged/merged.yaml -o examples/split/
Split and generate a Kustomization file:
splinter split -k -i examples/merged/merged.yaml -o examples/split/
Merge multiple files into stdout:
splinter merge -i examples/split/
Merge into a specific file:
splinter merge -i examples/split/ -o examples/flatten/my-manifest.yaml
Split Helm output:
helm template my-release sealed-secrets/sealed-secrets | splinter split -o my-dir/
Split Helm output and include additional files:
helm template my-release sealed-secrets/sealed-secrets | splinter split -i existing.yaml -o my-dir/
This project uses Nix for development environment consistency.
Assuming a working Nix installation:
nix develop .
go test ./...
go build
go run main.go merge -i examples/split/
- vhs to make the gifs in this readme