# Using Filebeat on K8s - Trying to obtain App logs inside Pods

**URL:** https://discuss.elastic.co/t/using-filebeat-on-k8s-trying-to-obtain-app-logs-inside-pods/224116
**Category:** Beats
**Tags:** filebeat
**Created:** [March 18, 2020, 1:23pm UTC](https://discuss.elastic.co/t/using-filebeat-on-k8s-trying-to-obtain-app-logs-inside-pods/224116 "2020-03-18T13:23:19Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![ConorTier](https://avatars.discourse-cdn.com/v4/letter/c/6de8d8/32.png) [@ConorTier](https://discuss.elastic.co/u/ConorTier)
#### Post date: [March 24, 2020, 2:27pm UTC](https://discuss.elastic.co/t/using-filebeat-on-k8s-trying-to-obtain-app-logs-inside-pods/224116/2 "2020-03-24T14:27:54Z")

</div>

@solijam Please see below:

Basically dont use a demon set as as you wont access individual pods logs, use a persistent volume to store all logs then mount that within each pod.

Then 1 instance of filebeats to read the persistent volumn files.

Above should work - but im getting an error with file timeout not reading new inputs - hopefully somebody will point us to right direction

> [@Filebeats Kubernetes File close due to inactive of 5min](https://discuss.elastic.co/t/filebeats-kubernetes-file-close-due-to-inactive-of-5min/224855):
>
> Hey, Here is the setup currently have half working - Kubernetes - Amazon K8 - with a instance of logstash and file beats running on two pods - no demon sets for filebeats as want to read files from a specific directory on each of the pods (logs are stored in a volume mounted persistent volume- specifically azure file storage) - not interested in the pods docker stout. Also persistent volume to hold data from log files delta ids for redeployments as not to loose filebeats data deltas for files. …

---

_[View the full topic](https://discuss.elastic.co/t/using-filebeat-on-k8s-trying-to-obtain-app-logs-inside-pods/224116)._
