# How does Dynatrace detect a master or worker node in Kubernetes/Openshift

**URL:** <https://community.dynatrace.com/t/how-does-dynatrace-detect-a-master-or-worker-node-in-kubernetes-openshift/35449>\
**Category:** Container platforms\
**Tags:** openshift, kubernetes\
**Created:** [June 10, 2022, 9:48am UTC](https://community.dynatrace.com/t/how-does-dynatrace-detect-a-master-or-worker-node-in-kubernetes-openshift/35449 "2022-06-10T09:48:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![henk\_stobbe](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/henk_stobbe/32/30434_2.png) [@henk\_stobbe](https://community.dynatrace.com/u/henk_stobbe)\
**Post date:** [June 10, 2022, 9:48am UTC](https://community.dynatrace.com/t/how-does-dynatrace-detect-a-master-or-worker-node-in-kubernetes-openshift/35449/1 "2022-06-10T09:48:25Z")

</div>

Hello,

How does the operator knows what a worker or a management node is and only adds oneAgent to workers?

KR Henk

---

<div class="post-metadata">

**Author:** ![henk\_stobbe](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/henk_stobbe/32/30434_2.png) [@henk\_stobbe](https://community.dynatrace.com/u/henk_stobbe)\
**Post date:** [June 10, 2022, 10:12am UTC](https://community.dynatrace.com/t/how-does-dynatrace-detect-a-master-or-worker-node-in-kubernetes-openshift/35449/2 "2022-06-10T10:12:56Z")

</div>

Found it,

Out of the box all nodes get an oneAgent, if you&nbsp; do not want to monitor master nodes, you have to comment out below tolerations in the oneAgent part of the yaml. The default taint with noschedule is than respected.

taint = something not allowed

tolerations = something allowed (tollerated)

 ![henk_stobbe_0-1654855580488.png](https://global.discourse-cdn.com/dynatrace/original/2X/0/04f44d720b74cc7953c77402b5f4a204c15827d7.png)

KR Henk

---

<div class="post-metadata">

**Author:** ![henk\_stobbe](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/henk_stobbe/32/30434_2.png) [@henk\_stobbe](https://community.dynatrace.com/u/henk_stobbe)\
**Post date:** [June 10, 2022, 2:07pm UTC](https://community.dynatrace.com/t/how-does-dynatrace-detect-a-master-or-worker-node-in-kubernetes-openshift/35449/3 "2022-06-10T14:07:16Z")

</div>

Hello,

To make this post complete, there is also a “bare bones” approach:

In the YAML you can also use node selector,

# Optional: node selector to control on which nodes the OneAgent will be deployed.  
#  
# nodeSelector: {}

KR Henk

---

<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:** [June 10, 2022, 7:14pm UTC](https://community.dynatrace.com/t/how-does-dynatrace-detect-a-master-or-worker-node-in-kubernetes-openshift/35449/4 "2022-06-10T19:14:59Z")

</div>

That’s a good one!!
