<p>Im new in Kubernetes and having a hard time making to read application.properties in the deployment. I have attached our ConfigMap as a mounted volume under the /config path.</p>
<p>This is my deployment.yaml</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
 metadata:
  name: myapp
  namespace: default
spec:
 replicas: 2
 selector:
   matchLabels:
    app: myapp
template:
  metadata:
    labels:
     app: myapp
  spec:
    containers:
      - name: myapp
        image: 34343434.dkr.ecr.asia-2.amazonaws.com/myapp:latest
        ports:
         - containerPort: 80
        volumeMounts:
        - name: application-properties
          mountPath: /config
      volumes:
      - name: application-properties
        configMap:
          name: application-properties
</code></pre>
<p>I have created configmap using kubectl command from a file that is located in my local computer.</p>
<pre><code>kubectl create configmap application-properties -–from-file=/users/me/application.properties
</code></pre>
<p>Now the issue is the application.property file which i am setting it using the kubectl configmap is not getting picked up. Can you help me on this?</p>

gippo
<p>Based on the discussion, the issue was the configmap, instead of the <code>property</code> file, it was rendered as a string in the configmap.</p>
<pre><code>kubectl get configmap application-properties  -o yaml
&gt;shows the contents but with all in oneline format. separated by \n
</code></pre>
<p><a href="https://env.simplestep.ca/" rel="nofollow noreferrer">Converting it to YAML</a> <code>application.yml</code> did the trick.</p>
