LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

ytt

YAML templating tool that understands YAML structure

TLDR

Render a template
$ ytt -f [template.yml]
copy
Overlay data values
$ ytt -f [template.yml] --data-value [key=value]
copy
Multiple files / directories
$ ytt -f [config/] -f [values.yml]
copy
Output to a file
$ ytt -f [template.yml] > [out.yml]
copy

SYNOPSIS

ytt [*options*]

DESCRIPTION

ytt (from Carvel) templates YAML by operating on the YAML structure rather than raw text, reducing indentation bugs common with string templates. It supports data values, overlays, functions, and modular libraries—popular for Kubernetes manifests alongside kapp and kbld.Docs: https://carvel.dev/ytt/

PARAMETERS

-f, --file *path*

Template or data file/directory (repeatable).
--data-value *key=value*
Set a data value.
--data-values-file *path*
Load data values from YAML.
--output-files *dir*
Write results as files.
See ytt --help for strict mode, warnings, and library paths.

INSTALL

brew install ytt
copy
nix profile install nixpkgs#ytt
copy

CAVEATS

Learning curve differs from Helm/Go templates. Invalid YAML inputs fail closed. Combine with kapp for deploy workflows.

SEE ALSO

kapp(1), helm(1), gomplate(1), kustomize(1)

RESOURCES

Copied to clipboard
Kai