# Annotation to block Dynatrace injection in Openshift

**URL:** <https://community.dynatrace.com/t/annotation-to-block-dynatrace-injection-in-openshift/43917>\
**Category:** Container platforms\
**Tags:** openshift\
**Created:** [January 31, 2024, 12:50pm UTC](https://community.dynatrace.com/t/annotation-to-block-dynatrace-injection-in-openshift/43917 "2024-01-31T12:50:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![stephen\_brown](https://avatars.discourse-cdn.com/v4/letter/s/977dab/32.png) [@stephen\_brown](https://community.dynatrace.com/u/stephen_brown)\
**Post date:** [January 31, 2024, 12:50pm UTC](https://community.dynatrace.com/t/annotation-to-block-dynatrace-injection-in-openshift/43917/1 "2024-01-31T12:50:58Z")

</div>

Hi,

We have Dynatrace installed in classic Full stack mode (no CSI driver) on Openshift.  
For a small number of pods in a namespace we’d like have it so it runs without dynatrace.  
I tried the following from&nbsp;[Configure monitoring for namespaces and pods — Dynatrace Docs](https://docs.dynatrace.com/docs/setup-and-configuration/setup-on-k8s/guides/operation/annotate)

[dynatrace.com/inject](http://dynatrace.com/inject)  
[oneagent.dynatrace.com/inject](http://oneagent.dynatrace.com/inject)  
Setting those to false seemed to do nothing. Is this supposed to work? Or just for the full stack cloud native mode?  
Thanks,  
Steve

---

<div class="post-metadata">

**Author:** ![dannemca](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/dannemca/32/7215_2.png) [@dannemca](https://community.dynatrace.com/u/dannemca)\
**Post date:** [January 31, 2024, 8:00pm UTC](https://community.dynatrace.com/t/annotation-to-block-dynatrace-injection-in-openshift/43917/2 "2024-01-31T20:00:27Z")

</div>

With Classic, you can define some Container Monitoring Rules in your Global Settings to avoid having Dynatrace in some namespaces.

> **[Container monitoring rules](https://docs.dynatrace.com/docs/observe/infrastructure-observability/container-platform-monitoring/container-monitoring-rules)**
>
> Define, enable and disable container monitoring rules

I am really note sure about the inject annotation working for the Classic mode. As per doc page, it should works only for CloudNative and AppOnly

---

<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:** [February 1, 2024, 5:51am UTC](https://community.dynatrace.com/t/annotation-to-block-dynatrace-injection-in-openshift/43917/3 "2024-02-01T05:51:31Z")

</div>

It works only in applicationOnly and cloudNativeFullstack. It has no effect in classicFullStack. For classicfullstack you need the rules mentioned by [@dannemca](https://community.dynatrace.com/user/18264)
