# Filebeat not able to get k8s namespace annotations

**URL:** <https://discuss.elastic.co/t/filebeat-not-able-to-get-k8s-namespace-annotations/245000>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [August 14, 2020, 11:30am UTC](https://discuss.elastic.co/t/filebeat-not-able-to-get-k8s-namespace-annotations/245000 "2020-08-14T11:30:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tocw](https://avatars.discourse-cdn.com/v4/letter/t/53a042/32.png) [@tocw](https://discuss.elastic.co/u/tocw)\
**Post date:** [August 14, 2020, 11:30am UTC](https://discuss.elastic.co/t/filebeat-not-able-to-get-k8s-namespace-annotations/245000/1 "2020-08-14T11:30:41Z")

</div>

Hello,  
I noticed a potential issue with filebeat. I'm trying to add some annotations to the log messages and I noticed that filebeat is not able to get namespace annotations from kubernetes cluster. Pod annotations are working fine. Here is my minimal config:

```auto
filebeat.autodiscover:
  providers:
    - type: kubernetes
      hints.enabled: true
      include_annotations: ["kubernetes.io/psp", "leanix.net/fact-sheet"]

output.file:
  path: /tmp/filebeat
  filename: filebeat

```

Expected result in this case should be a json object with the following field

```auto
    "annotations": {
      "kubernetes_io/psp": "restricted-gitvolume",
      "leanix.net/fact-sheet": "some-value"
    }

```

Instead of that I get this output

```auto
    "annotations": {
      "kubernetes_io/psp": "restricted-gitvolume"
    }

```

Can you please verify my configuration? I'm not sure whether this is a filebeat issue or I configured it wrong.  
Thank you

---

<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 11, 2020, 1:30pm UTC](https://discuss.elastic.co/t/filebeat-not-able-to-get-k8s-namespace-annotations/245000/2 "2020-09-11T13:30:49Z")

</div>

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