# Pod limit in GKE Dynatrace

**URL:** <https://community.dynatrace.com/t/pod-limit-in-gke-dynatrace/50215>\
**Category:** Container platforms\
**Tags:** dynatrace-operator, kubernetes\
**Created:** [February 11, 2025, 8:08pm UTC](https://community.dynatrace.com/t/pod-limit-in-gke-dynatrace/50215 "2025-02-11T20:08:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![MariaElena](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/mariaelena/32/27029_2.png) [@MariaElena](https://community.dynatrace.com/u/MariaElena)\
**Post date:** [February 11, 2025, 8:08pm UTC](https://community.dynatrace.com/t/pod-limit-in-gke-dynatrace/50215/1 "2025-02-11T20:08:18Z")

</div>

Hi Team,

Can someone help me to know how I can limit the number of PODS in oneagent and oneagent-csi-driver in Kubernates. Currently it creates the 7 pods, those 7 pods correspond to the number of nodes created in the cluster.

 ![MariaElena_0-1739304484170.png](https://global.discourse-cdn.com/dynatrace/original/3X/3/9/3902280749a1aff12ecb6aae87a2d5d8f233f370.png)

But what I require is to have only two pods, this in order not to use more GKE resources.

Regards

---

<div class="post-metadata">

**Author:** ![gopher](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/gopher/32/5728_2.png) [@gopher](https://community.dynatrace.com/u/gopher)\
**Post date:** [February 11, 2025, 10:48pm UTC](https://community.dynatrace.com/t/pod-limit-in-gke-dynatrace/50215/2 "2025-02-11T22:48:58Z")

</div>

Hi&nbsp;[@MariaElena](https://community.dynatrace.com/user/32174),&nbsp; &nbsp;OneAgent / OneAgent-CSI is a Daemon Set.&nbsp; This means that it will be deployed to all nodes.  
This is expected and can’t be changed.&nbsp; This is covered here: [Dynatrace Operator — Dynatrace Docs](https://docs.dynatrace.com/docs/ingest-from/setup-on-k8s/how-it-works/components/dynatrace-operator#csidriver)

This is mostly because they need to operate at the node level to be able to instrument all pods that are running on the node as well as running the CSI drivers for the OneAgent image /storage.

The only alternate to this is for you to do a combination of Pod Runtime (not automatic injection) and Kubernetes monitoring.&nbsp; this will allow you to run 1 replica set of the Active Gate and only deploy Dynatrace Code Modules - directly via the pod deployment config wherever the pod is deployed.&nbsp;  
[Kubernetes platform monitoring — Dynatrace Docs](https://docs.dynatrace.com/docs/ingest-from/setup-on-k8s/how-it-works/kubernetes-monitoring)  
[Application observability — Dynatrace Docs](https://docs.dynatrace.com/docs/ingest-from/setup-on-k8s/how-it-works/application-monitoring#runtime)

Enjoy.

---

<div class="post-metadata">

**Author:** ![MariaElena](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/mariaelena/32/27029_2.png) [@MariaElena](https://community.dynatrace.com/u/MariaElena)\
**Post date:** [February 12, 2025, 12:01am UTC](https://community.dynatrace.com/t/pod-limit-in-gke-dynatrace/50215/3 "2025-02-12T00:01:30Z")

</div>

Hi&nbsp;[gopher,](https://community.dynatrace.com/user/10565)

Thanks for the support, now I understand.

Regards

---

<div class="post-metadata">

**Author:** ![erh\_inetum](https://avatars.discourse-cdn.com/v4/letter/e/48db29/32.png) [@erh\_inetum](https://community.dynatrace.com/u/erh_inetum)\
**Post date:** [February 12, 2025, 6:50am UTC](https://community.dynatrace.com/t/pod-limit-in-gke-dynatrace/50215/4 "2025-02-12T06:50:31Z")

</div>

Hi María Elena,

Add to the great post of&nbsp;[@gopher](https://community.dynatrace.com/user/10565)&nbsp;I think [this](https://docs.dynatrace.com/docs/shortlink/annotate#monitor-only-specific-pods) can also help you&nbsp;to select only the pods you want to monitor.

Hope it helps,  
Regards,  
Elena.
