# Kubernetes autodiscover with annotation not working

**URL:** <https://discuss.elastic.co/t/kubernetes-autodiscover-with-annotation-not-working/280621>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [August 6, 2021, 8:00am UTC](https://discuss.elastic.co/t/kubernetes-autodiscover-with-annotation-not-working/280621 "2021-08-06T08:00:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![edwardlol](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/edwardlol/32/92571_2.png) [@edwardlol](https://discuss.elastic.co/u/edwardlol)\
**Post date:** [August 6, 2021, 8:00am UTC](https://discuss.elastic.co/t/kubernetes-autodiscover-with-annotation-not-working/280621/1 "2021-08-06T08:00:23Z")

</div>

I want to enable log collecting on specific pods (or namespace, but I'm trying to enable it on pods first).

I disabled hints/default\_config

```auto
filebeat.autodiscover:
  providers:
    - type: kubernetes
      node: ${NODE_NAME}
      hints.enabled: true
      hints.default_config:
        enabled: false
        type: container
        paths:
          - /var/log/containers/*-${data.kubernetes.container.id}.log

```

and configured a pod running with annotation `co.elastic.logs/enabled: "true"`

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/5/7/5736c97470c8050d12508feaef29591b00c3a769.png)

But there's still no data collected to my es

---

<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:** [September 3, 2021, 10:00am UTC](https://discuss.elastic.co/t/kubernetes-autodiscover-with-annotation-not-working/280621/2 "2021-09-03T10:00:31Z")

</div>

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