# what api  can be used to get events from all pods from a kubernetes cluster?

**URL:** <https://community.dynatrace.com/t/what-api-can-be-used-to-get-events-from-all-pods-from-a-kubernetes-cluster/56271>\
**Category:** Dynatrace API\
**Tags:** kubernetes, dynatrace-api\
**Created:** [June 24, 2026, 9:01am UTC](https://community.dynatrace.com/t/what-api-can-be-used-to-get-events-from-all-pods-from-a-kubernetes-cluster/56271 "2026-06-24T09:01:20Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arunkumarbnp](https://avatars.discourse-cdn.com/v4/letter/a/d26b3c/32.png) [@Arunkumarbnp](https://community.dynatrace.com/u/Arunkumarbnp)\
**Post date:** [June 24, 2026, 9:01am UTC](https://community.dynatrace.com/t/what-api-can-be-used-to-get-events-from-all-pods-from-a-kubernetes-cluster/56271/1 "2026-06-24T09:01:20Z")

</div>

what api can be used to get events from all pods from a kubernetes cluster?

---

<div class="post-metadata">

**Author:** ![AntonPineiro](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/antonpineiro/32/49_2.png) [@AntonPineiro](https://community.dynatrace.com/u/AntonPineiro)\
**Post date:** [June 24, 2026, 9:51am UTC](https://community.dynatrace.com/t/what-api-can-be-used-to-get-events-from-all-pods-from-a-kubernetes-cluster/56271/2 "2026-06-24T09:51:21Z")

</div>

Hi,

I would check [Events API v2](https://docs.dynatrace.com/docs/shortlink/api-events-v2).

Best regards

---

<div class="post-metadata">

**Author:** ![Arunkumarbnp](https://avatars.discourse-cdn.com/v4/letter/a/d26b3c/32.png) [@Arunkumarbnp](https://community.dynatrace.com/u/Arunkumarbnp)\
**Post date:** [June 24, 2026, 9:56am UTC](https://community.dynatrace.com/t/what-api-can-be-used-to-get-events-from-all-pods-from-a-kubernetes-cluster/56271/3 "2026-06-24T09:56:25Z")

</div>

Hi&nbsp;[@AntonPineiro](https://community.dynatrace.com/user/58682)

I tested the following API endpoint to retrieve Kubernetes-related events:

{{baseUrl}}/it\_prod-dynatrace-environment-apac/v2/events?entitySelector=entityId(KUBERNETES\_CLUSTER-0FB79669080C9DD5)&from=now-60d&to=now&pageSize=500  
Observation:

The query successfully returns events for the Kubernetes cluster (KUBERNETES\_CLUSTER-0FB79669080C9DD5).  
However, no events for individual Kubernetes pods are included in the response.

---

<div class="post-metadata">

**Author:** ![Julius\_Loman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/julius_loman/32/51_2.png) [@Julius\_Loman](https://community.dynatrace.com/u/Julius_Loman)\
**Post date:** [June 24, 2026, 10:26am UTC](https://community.dynatrace.com/t/what-api-can-be-used-to-get-events-from-all-pods-from-a-kubernetes-cluster/56271/4 "2026-06-24T10:26:16Z")

</div>

Use DQL:

```markup
fetch events
| filter k8s.cluster.name == "mycluster"
| filter event.provider == "KUBERNETES_EVENT" or event.provider == "KUBERNETES_INFERRED_EVENT"

```

And use the platform&nbsp;/platform/storage/query/v1 API , see&nbsp;[Access platform APIs from outside | Dynatrace Developer](https://developer.dynatrace.com/develop/guides/access-platform-apis-from-outside/)&nbsp;on how to access it.

Or use [dtctl](https://github.com/dynatrace-oss/dtctl) insted which might be much easier to use.

---

<div class="post-metadata">

**Author:** ![Arunkumarbnp](https://avatars.discourse-cdn.com/v4/letter/a/d26b3c/32.png) [@Arunkumarbnp](https://community.dynatrace.com/u/Arunkumarbnp)\
**Post date:** [June 24, 2026, 10:51am UTC](https://community.dynatrace.com/t/what-api-can-be-used-to-get-events-from-all-pods-from-a-kubernetes-cluster/56271/5 "2026-06-24T10:51:36Z")

</div>

[@Julius\_Loman](https://community.dynatrace.com/user/3364)&nbsp;I’m using dynatrace classic, how can I use this query?

---

<div class="post-metadata">

**Author:** ![Julius\_Loman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/julius_loman/32/51_2.png) [@Julius\_Loman](https://community.dynatrace.com/u/Julius_Loman)\
**Post date:** [June 24, 2026, 11:00am UTC](https://community.dynatrace.com/t/what-api-can-be-used-to-get-events-from-all-pods-from-a-kubernetes-cluster/56271/6 "2026-06-24T11:00:54Z")

</div>

With Dynatrace Classic or Dynatrace Managed you are left with the Events API that&nbsp;[@AntonPineiro](https://community.dynatrace.com/user/58682)&nbsp; suggested.  
You need to select events from workloads running in the kubernetes cluster and you must adjust entitySelector accordingly.
