Part of k14s.io: ytt | kbld | kapp | kwt

Features

  • Template any YAML content, including,
    • Kubernetes configuration, Concourse pipelines, AWS CloudFormation configurations, etc.
  • Works directly with YAML structures, not text
    • hence avoids variety of problems such as YAML value quoting, manual template indentation (as seen with Helm)
  • Includes sandboxed Pythonic language
    • making template code look familiar, e.g. "-listen=:" + str(data.values.port)
  • Encourages modularization and reuse of YAML structures via functions
    • users can easily define custom functions that return YAML structures
  • Supports merging of YAML structures via builtin overlay package
  • Provides several ways to inject data values into templates
  • Allows data validation via builtin assert package
  • Includes experimental strict YAML mode
  • Includes optional text templating

Basic Usage

# Configurations picked up from a directory
$ ytt -f examples/playground/example-demo/ | kubectl apply -f-
# Input customized on command line or file configuration
$ ytt -f examples/playground/example-demo/ --data-value-yaml service.enabled=false | kapp -y deploy -a app1 -f-
# Output template results as json
$ ytt -f examples/playground/example-demo/ -o json