# Cannot get Kubernetes Metadata after migrating to Containerd

**URL:** <https://discuss.elastic.co/t/cannot-get-kubernetes-metadata-after-migrating-to-containerd/276203>\
**Category:** Beats\
**Tags:** docker, filebeat\
**Created:** [June 16, 2021, 9:56pm UTC](https://discuss.elastic.co/t/cannot-get-kubernetes-metadata-after-migrating-to-containerd/276203 "2021-06-16T21:56:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![lel\_war](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lel_war/32/90448_2.png) [@lel\_war](https://discuss.elastic.co/u/lel_war)\
**Post date:** [June 16, 2021, 9:56pm UTC](https://discuss.elastic.co/t/cannot-get-kubernetes-metadata-after-migrating-to-containerd/276203/1 "2021-06-16T21:56:36Z")

</div>

Hello,  
After I migrated my cluster to containerd, logs are no longer on /var/lib/docker but rather in /var/log/pods/_/_/_.log and symlinks in /var/log/containers/_.log.

I configured filebeat with the following and although I get logs, I cannot get kubernetes metadata such as labels:

```auto
apiVersion: v1
data:
  filebeat.yml: |
    filebeat.inputs:
    - type: container
      paths:
        - "/var/log/pods/*/*/*.log"
      processors:
        - add_kubernetes_metadata:
            host: ${NODE_NAME}
            in_cluster: true
            default_indexers.enabled: true
            default_matchers.enabled: true
    output.logstash:
      hosts: ${LOGSTASH_SVC}
    logging.level: debug

```

Please help! My logging logic heavily relies on kubernetes labels!

THANKS SO MUCH!

---

<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:** [July 14, 2021, 11:56pm UTC](https://discuss.elastic.co/t/cannot-get-kubernetes-metadata-after-migrating-to-containerd/276203/2 "2021-07-14T23:56:53Z")

</div>

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