# Custom log for Filebeat DaemonSet running on Kubernetes

**URL:** <https://discuss.elastic.co/t/custom-log-for-filebeat-daemonset-running-on-kubernetes/219031>\
**Category:** Beats\
**Tags:** docker, filebeat\
**Created:** [February 12, 2020, 3:32pm UTC](https://discuss.elastic.co/t/custom-log-for-filebeat-daemonset-running-on-kubernetes/219031 "2020-02-12T15:32:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![AndresL](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andresl/32/54070_2.png) [@AndresL](https://discuss.elastic.co/u/AndresL)\
**Post date:** [February 12, 2020, 3:32pm UTC](https://discuss.elastic.co/t/custom-log-for-filebeat-daemonset-running-on-kubernetes/219031/1 "2020-02-12T15:32:00Z")

</div>

Hi,  
i deployed a filebeat daemon set

> <https://github.com/elastic/beats/blob/master/deploy/kubernetes/filebeat/filebeat-daemonset.yaml>

And i would like to use a custom folder, like /var/mylogs  
I configure filebeat to read from "/var/mylogs" and create a volume. But it is not getting any data.  
This is the config:

and create a volume like:  
volumeMounts:  
- name: config  
mountPath: /etc/filebeat.yml  
readOnly: true  
subPath: filebeat.yml  
- name: data  
mountPath: /usr/share/filebeat/data  
- name: varlibdockercontainers  
mountPath: /var/lib/docker/containers  
readOnly: true  
- name: varlog  
mountPath: /var/log  
readOnly: true  
- name: applog  
mountPath: /var/mylogs  
readOnly: true  
volumes:  
- name: config  
configMap:  
defaultMode: 0600  
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:  
path: /var/lib/filebeat-data  
type: DirectoryOrCreate  
- name: applog  
hostPath:  
path: /var/mylogs

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 11, 2020, 3:32pm UTC](https://discuss.elastic.co/t/custom-log-for-filebeat-daemonset-running-on-kubernetes/219031/2 "2020-03-11T15:32:05Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
