<p>I have a docker image with the option for property file like, </p>

<pre><code>CMD java -jar /opt/test/test-service.war 
--spring.config.location=file:/conf/application.properties
</code></pre>

<p>I use the <code>-v</code> volume mount in my <code>docker run</code> command as follows.</p>

<pre><code>-v /usr/xyz/props/application.properties:/conf/application.properties
</code></pre>

<p>I am not sure how to achieve the same thing in Kubernetes.<br>
I use minikube to run kubernetes in my local mac.</p>

<p>That should be an <strong><a href="https://kubernetes.io/docs/concepts/storage/volumes/#hostpath" rel="noreferrer">host path volume</a></strong>, illustrated with this example pod.</p>

<pre><code>apiVersion: v1
kind: Pod
metadata:
  name: test-pd
spec:
  containers:
  - image: k8s.gcr.io/test-webserver
    name: test-container
    volumeMounts:
    - mountPath: /test-pd
      name: test-volume
  volumes:
  - name: test-volume
    hostPath:
      # directory location on host
      path: /data
      # this field is optional
      type: Directory
</code></pre>
