<p>I want to use kubernetes as my default development environment for that I set up the cluster locally with docker as explained in the <a href="http://kubernetes.io/v1.0/docs/getting-started-guides/docker.html" rel="nofollow noreferrer">official doc</a>. I push my example to a <a href="https://github.com/bitgandtter/k8s_devel_env" rel="nofollow noreferrer">github repository</a></p>

<p>My set up steps after having a kubernetes cluster running were:</p>

<pre><code>* cd cluster_config/app &amp;&amp; docker build --tag=k8s_php_dev . &amp;&amp; cd ../..
* kubectl -s http://127.0.0.1:8080 create -f cluster_config/app/app.rc.yml
* kubectl -s http://127.0.0.1:8080 create -f cluster_config/app/app.services.yml
</code></pre>

<p>My issues comes since I want to map a local directory as a volume inside my app pod so I can share dynamically the files in there between my local host and the pod, so i can develop, change the files; and dynamically update on the service.</p>

<p>I use a a volume with a hostPath. The pod, replication controller and service are created successfully but the pod do not share the directory not even have the file on the supposed on the mountPath.</p>

<p>What I'm doing wrong?</p>

<p>Thanks</p>

bitgandtter
<p>The issue was on the volume definition, the hostPath.path property should hold the absolute address of the directory to mount.</p>

<p>Example:</p>

<pre><code>hostPath:
  path: /home/bitgandtter/Documents/development/php/k8s_devel_env
</code></pre>
