<p>I need to move my filebeat to other namespace, but I must keep registry , I mean that:</p>
<pre><code> # data folder stores a registry of read status for all files, so we don't send everything again on a Filebeat pod restart
      - name: data
        hostPath:
          path: /var/lib/filebeat-data
          type: DirectoryOrCreate
</code></pre>
<p>Can you tell me how can I copy that in kubernetes</p>

user3740179
<p>Just to check my assumptions:</p>
<ul>
<li>filebeat is a a DaemonSet</li>
<li>When you start it up in the new Namespace, you want to keep the registry</li>
<li>You're happy to keep the on-disk path the same</li>
</ul>
<p>Because the <code>data</code> folder is mounted from the host directly - if you apply the same DaemonSet in a new Namespace, it will mount the same location into the container. So there's no need to copy any files around.</p>
