# Filebeat not adding kubernetes metadata

**URL:** <https://discuss.elastic.co/t/filebeat-not-adding-kubernetes-metadata/164232>\
**Category:** Beats\
**Tags:** docker, filebeat\
**Created:** [January 15, 2019, 4:15am UTC](https://discuss.elastic.co/t/filebeat-not-adding-kubernetes-metadata/164232 "2019-01-15T04:15:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jaininshah9](https://avatars.discourse-cdn.com/v4/letter/j/48db29/32.png) [@jaininshah9](https://discuss.elastic.co/u/jaininshah9)\
**Post date:** [January 15, 2019, 4:15am UTC](https://discuss.elastic.co/t/filebeat-not-adding-kubernetes-metadata/164232/1 "2019-01-15T04:15:53Z")

</div>

I am running a Kubernetes (v1.12.3) cluster and trying to use filebeat to get the data from docker containers. The logs works fine (for testing purpose I am sending it to just files), but there is no kubernetes metadata coming through. Here is my config, not sure what I am doing wrong.

Any help would be appreciated! Thank you!

filebeat.yaml

```
filebeat.config:
  inputs:
    # Mounted `filebeat-inputs` configmap:
    path: /root/filebeat-6.5.4-linux-x86_64/inputs.d/*.yml
    # Reload inputs configs as they change:
    reload.enabled: false
  modules:
    path: /root/filebeat-6.5.4-linux-x86_64/modules.d/*.yml
    # Reload module configs as they change:
    reload.enabled: false

# To enable hints based autodiscover, remove `filebeat.config.inputs` configuration and uncomment this:
#filebeat.autodiscover:
# providers:
# - type: kubernetes
# hints.enabled: true

output.file:
  path: "/tmp/filebeat"
  filename: filebeat
  #rotate_every_kb: 10000
  #number_of_files: 7
  #permissions: 0600

logging.level: debug

```

inputs.d/kubernetes.yml

```
- type: docker
  containers.ids:
    - "*"
  json.keys_under_root: true
  json.message_key: log
  encoding: utf-8
  document_type: docker
  processors:
    - add_kubernetes_metadata:
        in_cluster: false
        host: ${HOSTNAME}
        namesapce: kube-system
        default_indexers.enabled: true
        default_matchers.enabled: true
        include_pod_uid: true
        kube_config: /root/admin.kubeconfig

```

Logs: [https://paste.ubuntu.com/p/7Jhyf3NXgF/](https://paste.ubuntu.com/p/7Jhyf3NXgF/)

---

<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:** [February 12, 2019, 4:24am UTC](https://discuss.elastic.co/t/filebeat-not-adding-kubernetes-metadata/164232/2 "2019-02-12T04:24:07Z")

</div>

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