<p>When using pvc to persist the container data, it seems pvc always override the container's directory, the original data in directory will not be available, what's the reason ?</p>

zulv
<p>This is by design. Kubelet is responsible for preparing the mounts for your container, and they can come from plaethora of different storagebackends. At the time of mounting they are empty and kubelet has no reason to put any content in them.</p>

<p>That said, there are ways to achieve what you seem to expect by using init container. In your pod you define init container using your docker image, mount your volume in it in some path (ie. <em>/target</em>) but instead of running regular content of your container, run something like</p>

<pre><code>cp -r /my/dir/* /target/ 
</code></pre>

<p>which will initiate your directory with expected content and exit allowing further startup of the pod</p>
