<p>I have a deployment which requires to read a license file from a host. The license file is a text file (not a yaml config). I know we can mount a ConfigMap in a deployment but afaik ConfigMap is only in yaml format.</p>
<p>What is the best way to mount this single file into a deployment?</p>

Kintarō
<p>You can create a configmap from any file:</p>
<pre><code>kubectl create configmap &lt;map-name&gt; --from-file=file.cfg
</code></pre>
<p>Then you can mount the configmap to your pod:</p>
<pre><code>volumes:
  - name: config
    configMap:
      name: mapName
</code></pre>
<pre><code>volumeMounts:
  - name: config
    mountPath: /dir/file.cfg
    subPath: file.cfg
</code></pre>
