# KUBERNETES Log Reading using File Beat

**URL:** <https://discuss.elastic.co/t/kubernetes-log-reading-using-file-beat/131951>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [May 15, 2018, 2:15pm UTC](https://discuss.elastic.co/t/kubernetes-log-reading-using-file-beat/131951 "2018-05-15T14:15:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Venkatesh\_Radhakrish](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/venkatesh_radhakrish/32/31105_2.png) [@Venkatesh\_Radhakrish](https://discuss.elastic.co/u/Venkatesh_Radhakrish)\
**Post date:** [May 15, 2018, 2:15pm UTC](https://discuss.elastic.co/t/kubernetes-log-reading-using-file-beat/131951/1 "2018-05-15T14:15:59Z")

</div>

Hi - I am using following configuration in filebeat to read docker container logs. kubernetes is used for docker clustering.

filebeat.autodiscover:  
providers:  
- type: kubernetes  
templates:  
- condition:  
equals:  
kubernetes.namespace: msairlines  
config:  
- type: docker  
containers.ids:  
- "${data.kubernetes.container.id}"  
exclude\_lines: ["^\s+[\-`('.|\_]"] # drop asciiart lines

I am getting below issue. Please help me to resolve.  
"Exiting: Unable to get in cluster configuration: open /var/run/secrets/kubernetes.io/serviceaccount/namespace: no such file or directory"

Regards  
Venkat

---

<div class="post-metadata">

**Author:** ![exekias](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/exekias/32/28718_2.png) [@exekias](https://discuss.elastic.co/u/exekias)\
**Post date:** [May 16, 2018, 12:24pm UTC](https://discuss.elastic.co/t/kubernetes-log-reading-using-file-beat/131951/2 "2018-05-16T12:24:13Z")

</div>

Hi @Venkatesh_Radhakrish,

By default kubernetes autodiscover provider expects to be running inside the cluster, are you running it from outside?

Best regards

---

<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:** [June 13, 2018, 12:24pm UTC](https://discuss.elastic.co/t/kubernetes-log-reading-using-file-beat/131951/3 "2018-06-13T12:24:17Z")

</div>

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