<p>I have springboot application and I am trying to load additional configuration from a volume mounted location /tmp/secret-config.yaml and getting below error:
java.lang.IllegalStateException: Unable to load config data from '/tmp/secret-config.yaml'</p>
<p>I do not want to use configmap or secrets for this. It's a simple json file which I am trying to load.</p>
<p>I am trying to pass it like this from shell script.
java -jar /opt/app.jar --spring.config.additional-location=/tmp/secret-config.yaml</p>
<p>Can anyone please help ?</p>

mayank agarwal
<p>I would suggest to verify the volume mount of the file inside your pod.
You can verify it with the following commands:</p>
<pre><code>kubectl exec -it &lt;podName&gt; -- cat /tmp/secret-config.yaml

kubectl exec -it &lt;podName&gt; -- ls /tmp
</code></pre>
<p>In addition, the volume mount configuration in your yaml file would be interesting. Did you specify a <code>mountPath </code> for the <code>volumeMount</code> in your pod configuration?
You can also check the mountPath with the following command:</p>
<pre><code># for a pod with a single container and only one volumeMount
kubectl get pods &lt;podName&gt; -o jsonpath='{.spec.containers[0].volumeMounts[0].mountPath}'
</code></pre>
