# Disable Dynatrace OneAgent Instrumentation on Specific Kubernetes Namespaces

**URL:** <https://community.dynatrace.com/t/disable-dynatrace-oneagent-instrumentation-on-specific-kubernetes-namespaces/23065>\
**Category:** Container platforms\
**Tags:** openshift, oneagent, kubernetes\
**Created:** [February 21, 2020, 5:58pm UTC](https://community.dynatrace.com/t/disable-dynatrace-oneagent-instrumentation-on-specific-kubernetes-namespaces/23065 "2020-02-21T17:58:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kapil\_khanna](https://avatars.discourse-cdn.com/v4/letter/k/58956e/32.png) [@kapil\_khanna](https://community.dynatrace.com/u/kapil_khanna)\
**Post date:** [February 21, 2020, 5:58pm UTC](https://community.dynatrace.com/t/disable-dynatrace-oneagent-instrumentation-on-specific-kubernetes-namespaces/23065/1 "2020-02-21T17:58:34Z")

</div>

_Summary:&nbsp;This post explains how to exclude Kubernetes namespaces from OneAgent instrumentation. It describes annotation‑based methods and configuration options in Dynakube._

Currently, OneAgent can be configured to disable injection on a per host or on a technology stack basis. I was wondering if there is any way to disable monitoring on a namespace or even more granular basis, e.g., Container, Pod, or Deployment basis via the use of environment variables or annotations?

---

<div class="post-metadata">

**Author:** ![Enrico\_F](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/enrico_f/32/23774_2.png) [@Enrico\_F](https://community.dynatrace.com/u/Enrico_F)\
**Post date:** [February 21, 2020, 6:21pm UTC](https://community.dynatrace.com/t/disable-dynatrace-oneagent-instrumentation-on-specific-kubernetes-namespaces/23065/2 "2020-02-21T18:21:10Z")

</div>

Yes, have a look under Settings → Processes & Containers → Container monitoring:

 ![23717-1582309252343.png](https://global.discourse-cdn.com/dynatrace/original/2X/5/58ee8bd77c4dc4f8f46005d5c61e709f80986ff4.png)

---

<div class="post-metadata">

**Author:** ![sivart\_89](https://avatars.discourse-cdn.com/v4/letter/s/848f3c/32.png) [@sivart\_89](https://community.dynatrace.com/u/sivart_89)\
**Post date:** [August 9, 2022, 4:18pm UTC](https://community.dynatrace.com/t/disable-dynatrace-oneagent-instrumentation-on-specific-kubernetes-namespaces/23065/3 "2022-08-09T16:18:41Z")

</div>

Thanks for this, came in use today 🙂

Know of any plans to allow for more filtering when setting up do not monitor rules? In our case we have a namespace that is in 2 different kub clusters in our env. We ideally wanted to not monitor the namespace in just 1 of those clusters. I think an addition of the cluster name and the ability to use multiple options (AND logic) would be a good addition.
