# Kubernetes container labels

**URL:** <https://discuss.elastic.co/t/kubernetes-container-labels/340942>\
**Category:** Beats\
**Tags:** docker, filebeat\
**Created:** [August 16, 2023, 3:59pm UTC](https://discuss.elastic.co/t/kubernetes-container-labels/340942 "2023-08-16T15:59:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Omar\_Al](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/omar_al/32/124672_2.png) [@Omar\_Al](https://discuss.elastic.co/u/Omar_Al)\
**Post date:** [August 16, 2023, 3:59pm UTC](https://discuss.elastic.co/t/kubernetes-container-labels/340942/1 "2023-08-16T15:59:08Z")

</div>

We are in the process of creating a new instance of filebeat where we switch the container runtime to `containerd`, and we previously searched for a label in the docker container, but since we switched to `containerd`, we would like to access the labels in the container, but we couldn't find a way, we only could get the labels of the pod but not the containers in it. Is there a way to get the lables of the containers inside the pod and use them for a condition?

---

<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 13, 2023, 5:59pm UTC](https://discuss.elastic.co/t/kubernetes-container-labels/340942/2 "2023-09-13T17:59:49Z")

</div>

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