How to monitor a specific namespace in Kubernetes?

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.

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

Configure monitoring for namespaces and pods | Dynatrace Docs

Hi @Lwl ,

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

Thank you for your reply.

The solution depends on the Dynatrace deployment model you use in k8s see How it works — Dynatrace Docs

If you use classic full stack (still the default if you deploying it using the guided UI approach), then the container rules mentioned by @Mohamed_Hamdy  apply.

If you use the cloudNativeFullStack or application only, it’s described on the page mentioned by @Lwl - 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).

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.

Hi @rafaelsantossh,

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

Best regards,

János