Within container environments, OneAgent automatically injects code modules into containerized processes to provide out of the box full-stack visibility into applications running within containers. Dynatrace provides complete control over automatic injection of code modules into the container technologies.
In Kubernetes, container monitoring rules are evaluated only in case of classicFullStack injection mode. The rules are ignored in case of cloudNativeFullStack or applicationMonitoring.
Please use the annotation-based configuration option as described here.