<p>Consider the following <code>ConfigMap</code> definition, in, say, <code>foo.yml</code>:</p>

<pre><code>apiVersion: v1
kind: ConfigMap
metadata:
  name: foo-data
data:
  foo.json: |-
    {
      "foo": "foo",
      "bar": 42
    }
</code></pre>

<p>Is there a way to load the <code>foo.json</code> data from an external file, instead of inlining it in the template? It would be nice if I could put the data in a file <code>foo.json</code> next to <code>foo.yml</code>, reference it somehow, and have K8s figure it out when I apply the template.</p>

<p>Is that possible? How?</p>

<p>If not, is the feature on the roadmap?</p>

<p>Afaik there is no build-in templating as for now but you can use ansible templating capabilities with k8s yaml files saute or together with e.g. k8s plugin.</p>

<p>Works like a charm :)</p>
