<p>I have a GKE cluster running on Google Cloud. I created a persistence volume and mounted my deployments, So the connectivity between my application and persistence are bounded successfully.</p>
<p>I also have filebeat running on the same cluster using the below link <a href="https://github.com/elastic/beats/blob/master/deploy/kubernetes/filebeat-kubernetes.yaml" rel="nofollow noreferrer">https://github.com/elastic/beats/blob/master/deploy/kubernetes/filebeat-kubernetes.yaml</a></p>
<p>Both the application and filebeat also mounted successfully. The PV volume are created using <strong>access modes: ReadWriteOnce</strong> which is with GCE. But my cluster has many nodes running and my application is not mounted for all running pods. In google Cloud PV volumes are not supporting <strong>access modes: ReadWriteMany</strong>. So My filebeat too fails because of the application not mounted properly and filebeat has the capability of running in many nodes using deamonset. Is there a way to resolve the above issue.</p>

klee
<p>FileBeat should use volumes a bit different than volumes. Typically applications logs to <em>stdout</em> and then the <em>container runtime</em> (e.g. Docker daemon or containerd) persist the logs on the local node.</p>
<p>FileBeat need to run on every node, so it should be deployed using <code>DaemonSet</code> as you say. But it should also mount the volumes from the node using <code>hostPath</code> volumes.</p>
<p>See this part of the <code>DaemonSet</code> that you linked (no Persistent Volumes is used here):</p>
<pre><code>      volumes:
      - name: config
        configMap:
          defaultMode: 0640
          name: filebeat-config
      - name: varlibdockercontainers
        hostPath:
          path: /var/lib/docker/containers
      - name: varlog
        hostPath:
          path: /var/log
      # 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:
          # When filebeat runs as non-root user, this directory needs to be writable by group (g+w).
          path: /var/lib/filebeat-data
          type: DirectoryOrCreate
</code></pre>
