<p>In kubernetes kustomize.yml, when I use configMapGenerator to pass in some values as env, can I access those variables in deployed springboot application, application.properties file?</p>

<p>kustomize.yml</p>

<pre><code>...
configMapGenerator:
  - name: test-app-config
    env: ./test/applicationsetup.env
...
</code></pre>

<p>test/applicationsetup.env</p>

<pre><code>some_key=data1
some_key1=data2
</code></pre>

<p>application.properties</p>

<pre><code>APPLICATION_KEY=${some_key}
APPLICATION_KEY1=${some_key1}
</code></pre>

<p>I missed to add configMapRef inside container where I was trying to access the data.</p>

<pre><code>containers:
        - name: test-container
          image: &lt;image&gt;
          envFrom:
            - configMapRef:
                name: test-app-config
</code></pre>
