JSON is valid YAML. That is, YAML syntax is a superset of JSON syntax.
So, YAML parsers naturally parse JSON.
$ ytt --data-value-yaml "stable_config=$( cat stable_config.json )" -f cluster-template-paving.yaml -f values.yml
Note: the values.yml
needs to be present for ytt
at the time of writing because data values specified on the command-line are each applied as an overlay with default matching (i.e. matches exactly one node).