# How to monitor a specific namespace in Kubernetes?

**URL:** <https://community.dynatrace.com/t/how-to-monitor-a-specific-namespace-in-kubernetes/41567>\
**Category:** Container platforms\
**Tags:** kubernetes\
**Created:** [September 8, 2023, 1:57am UTC](https://community.dynatrace.com/t/how-to-monitor-a-specific-namespace-in-kubernetes/41567 "2023-09-08T01:57:52Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lwl](https://avatars.discourse-cdn.com/v4/letter/l/f4b2a3/32.png) [@Lwl](https://community.dynatrace.com/u/Lwl)\
**Post date:** [September 8, 2023, 1:57am UTC](https://community.dynatrace.com/t/how-to-monitor-a-specific-namespace-in-kubernetes/41567/1 "2023-09-08T01:57:52Z")

</div>

Hi，friends

hope to get help.

Monitoring k8s, only monitoring a specific namespace, can this be implemented, if so, what configuration needs to be done.

---

<div class="post-metadata">

**Author:** ![Lwl](https://avatars.discourse-cdn.com/v4/letter/l/f4b2a3/32.png) [@Lwl](https://community.dynatrace.com/u/Lwl)\
**Post date:** [September 8, 2023, 2:01am UTC](https://community.dynatrace.com/t/how-to-monitor-a-specific-namespace-in-kubernetes/41567/2 "2023-09-08T02:01:40Z")

</div>

Although the help document, found some relevant information, but still a little bit not understand.

[Configure monitoring for namespaces and pods | Dynatrace Docs](https://www.dynatrace.com/support/help/setup-and-configuration/setup-on-k8s/guides/operation/annotate)

---

<div class="post-metadata">

**Author:** ![Mohamed\_Hamdy](https://avatars.discourse-cdn.com/v4/letter/m/7ab992/32.png) [@Mohamed\_Hamdy](https://community.dynatrace.com/u/Mohamed_Hamdy)\
**Post date:** [September 8, 2023, 4:23am UTC](https://community.dynatrace.com/t/how-to-monitor-a-specific-namespace-in-kubernetes/41567/3 "2023-09-08T04:23:08Z")

</div>

Hi&nbsp;[@Lwl](https://community.dynatrace.com/user/63531)&nbsp;,

you can go with the same way mentioned in the link you’ve shared or before the implementation for monitoring K8s, You can create the needed rules as per the following screenshot from the UI settings, I do recommend using do not monitor as this works for me to exclude some namespaces

 ![Mohamed_Hamdy_0-1694146723171.png](https://global.discourse-cdn.com/dynatrace/original/2X/7/7938b3cc89af588d2577665199371d7077d856fc.png)

---

<div class="post-metadata">

**Author:** ![Lwl](https://avatars.discourse-cdn.com/v4/letter/l/f4b2a3/32.png) [@Lwl](https://community.dynatrace.com/u/Lwl)\
**Post date:** [September 8, 2023, 5:21am UTC](https://community.dynatrace.com/t/how-to-monitor-a-specific-namespace-in-kubernetes/41567/4 "2023-09-08T05:21:00Z")

</div>

Thank you for your reply.

---

<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:** [September 8, 2023, 7:22am UTC](https://community.dynatrace.com/t/how-to-monitor-a-specific-namespace-in-kubernetes/41567/5 "2023-09-08T07:22:49Z")

</div>

The solution depends on the Dynatrace deployment model you use in k8s see&nbsp;[How it works — Dynatrace Docs](https://www.dynatrace.com/support/help/shortlink/how-it-works-k8s)

If you use classic full stack (still the default if you deploying it using the guided UI approach), then the container rules mentioned by&nbsp;[@Mohamed\_Hamdy](https://community.dynatrace.com/user/4007)&nbsp; apply.

If you use the cloudNativeFullStack or application only, it’s described on the page mentioned by&nbsp;[@Lwl](https://community.dynatrace.com/user/63531)&nbsp;- you define monitoring rules in your kubernetes deployment by labeling the namespaces and setting the annotiations at pods to exclude a particular pod from being monitored (if required).

---

<div class="post-metadata">

**Author:** ![rafaelsantossh](https://avatars.discourse-cdn.com/v4/letter/r/9e8a1a/32.png) [@rafaelsantossh](https://community.dynatrace.com/u/rafaelsantossh)\
**Post date:** [February 11, 2025, 12:59am UTC](https://community.dynatrace.com/t/how-to-monitor-a-specific-namespace-in-kubernetes/41567/6 "2025-02-11T00:59:12Z")

</div>

Hi Sir,

Using UI method to monitor specific pods/namespaces, is it possible to set the cluster name? I have multiple clusters and just one of them have to avoid the namespace qwerty.

---

<div class="post-metadata">

**Author:** ![mizso74](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/mizso74/32/41729_2.png) [@mizso74](https://community.dynatrace.com/u/mizso74)\
**Post date:** [February 11, 2025, 7:57am UTC](https://community.dynatrace.com/t/how-to-monitor-a-specific-namespace-in-kubernetes/41567/7 "2025-02-11T07:57:52Z")

</div>

Hi&nbsp;[@rafaelsantossh](https://community.dynatrace.com/user/86529),

At the classic full stack UI method there is not cluster filtering. 😞

Best regards,

János
