title: how to copy data generated by kuberenetes pods to PV in manifest
body: <p>I have following Pod Yml, I am successfully able to get data generated by container in docker in attached volume, I created images form same docker file and pull images in Kuberentes, I have also attached PV to Pod, when i login to pod during running condition I can see Pod is able to generated data, I tried to mount to PV to folder I got and error . If I mount PV to another location, generated data is not able to save in PV, after Pod kill , all generated data are gone.</p>
  <p><strong>pod.yml</strong></p>
  <pre><code>apiVersion: v1
  kind: Pod
  metadata:
    name: pullandmerge
  spec:
    containers:
    - name: pullandmerge
      image: azurecr.io/pullandmerge:v1
      
               
      volumeMounts:
              - name: my-azurefile-volume
                mountPath: /data-temp # if i change this to /data, no error but data is not saved to PV
                # what can I do to move data geenrated by pod to PV
    volumes:
          - name: my-azurefile-volume
            persistentVolumeClaim:
              claimName: my-azurefile-pvc
  
    restartPolicy: Never
  </code></pre>
  <p><strong>Dockerfile</strong></p>
  <pre><code>From ububtuu:latest
  RUN mkdir -p /data-temp
  WORKDIR /data-temp
  COPY ..
  ENTRYPOINT [&quot;pyhton3&quot;, &quot;/data-temp/pull_and_merge_data.py&quot;, &quot;bash&quot;]
  </code></pre>
  <p>error I got
  [Error2} no such file or directory cannot  opne file /data-temp/pull_and_merge_data.py'</p>