How to keep filebeat registry

8/7/2020

I need to move my filebeat to other namespace, but I must keep registry , I mean that:

 # 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

Can you tell me how can I copy that in kubernetes

-- user3740179
filebeat
kubernetes

1 Answer

8/19/2020

Just to check my assumptions:

  • filebeat is a a DaemonSet
  • When you start it up in the new Namespace, you want to keep the registry
  • You're happy to keep the on-disk path the same

Because the data 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.

-- Mike Bryant
Source: StackOverflow