<p>Does the following configuration for configMap create the test.json file of type <code>empty array</code> or <code>string []</code></p>
<pre><code>kind: ConfigMap
apiVersion: v1
metadata:
  name: myconfigmap
data:
  test.json: |-
    []
</code></pre>
<p>The convertor to JSON suggests string:</p>
<pre><code>{
    &quot;kind&quot;: &quot;ConfigMap&quot;,
    &quot;apiVersion&quot;: &quot;v1&quot;,
    &quot;metadata&quot;: {
        &quot;name&quot;: &quot;myconfigmap&quot;
    },
    &quot;data&quot;: {
        &quot;test.json&quot;: &quot;[]&quot;
    }
}
</code></pre>
<p>My goal is to create configMap file with empty array.</p>

maopuppets
<p>Sure, you can make it whatever string you want, it just has to be a string. The thing you <em>can't</em> do is <code>test.json: []</code> since that's an array. The fact that your string happens to be valid JSON is not something K8s knows or cares about.</p>
