ytt templates are plain YAML documents made from nodes such as maps and arrays. ytt allows you to set values and attach statements (such as if and for loops) on those nodes. This eliminates text insertion concerns like manual escaping and allows for easy structure reuse, thus, increasing readability.
Regarding this, does YAML support variables?
YAML does not natively support variable placeholders. Anchors and Aliases almost provide the desired functionality, but these do not work as variable placeholders that can be inserted into arbitrary regions throughout the YAML text. They must be placed as separate YAML nodes.
Secondly, what is YTT command?
ytt (part of the open source Carvel suite) is a tool that can templatize, combine, and patch any YAML content. ytt understands the structure of YAML.
What is YTT overlay?
One of the main things that TKG uses ytt for is the use of overlays. An overlay file describes how another YAML manifests should be altered. In this way, we can take a normal YAML manifest such as a Kubernetes Deployment file, and make changes to the “base” template with whats in the overlay template.