# Logs Ingest on K8s with Dynatrace

**URL:** <https://community.dynatrace.com/t/logs-ingest-on-k8s-with-dynatrace/53313>\
**Category:** Troubleshooting\
**Tags:** log-analytics, kubernetes, logs\
**Created:** [September 11, 2025, 11:20pm UTC](https://community.dynatrace.com/t/logs-ingest-on-k8s-with-dynatrace/53313 "2025-09-11T23:20:22Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jgrant](https://avatars.discourse-cdn.com/v4/letter/j/8edcca/32.png) [@jgrant](https://community.dynatrace.com/u/jgrant)\
**Post date:** [September 11, 2025, 11:20pm UTC](https://community.dynatrace.com/t/logs-ingest-on-k8s-with-dynatrace/53313/1 "2025-09-11T23:20:22Z")

</div>

# Summary

In April 2025, [Dynatrace released a log module feature](https://docs.dynatrace.com/docs/shortlink/release-notes-saas-sprint-313#stay-in-control-of-your-kubernetes-logs-with-dynatraces-fully-automated-log-management) for automatic log ingest of container logs on clusters monitored with OneAgent workload in [Cloud Native Fullstack](https://github.com/Dynatrace/dynatrace-operator/blob/main/assets/samples/dynakube/v1beta5/cloudNativeFullStack.yaml) or [App-only](https://github.com/Dynatrace/dynatrace-operator/blob/main/assets/samples/dynakube/v1beta5/applicationMonitoring.yaml) modes or [without OneAgent](https://github.com/Dynatrace/dynatrace-operator/blob/main/assets/samples/dynakube/v1beta5/logMonitoring.yaml). If you encounter any log ingest issues with our log module feature, please review the below pre-requisites and steps to enabling logs on k8s.

# Preparing your cluster for our new Log module feature

### For OneAgent workloads in mode Classic Fullstack

If you deploy the OneAgent workload in Classic Fullstack or deploy a deprecated technology like OneAgent Operator, we encourage [migrating to our Cloud Native Fullstack deployment](https://docs.dynatrace.com/docs/shortlink/migration-cloud-native#migrate) and enabling our log module feature for automatic log ingest of container logs.

> 1. Update installation with CSI driver included:
> 
> 2. In your Dynakube, change `.spec.OneAgent.classicFullStack: {}` to `.spec.OneAgent.cloudNativeFullStack: {}`

### Update Dynatrace Operator

Please [update Dynatrace Operator](https://docs.dynatrace.com/docs/ingest-from/setup-on-k8s/guides/deployment-and-configuration/updates-and-maintenance/update-uninstall-operator) and follow the below steps for log monitoring on k8s with our log module. Check our latest version in [Dynatrace Operator latest release](https://github.com/Dynatrace/dynatrace-operator/releases/latest).

- Below command is only to update the Dynatrace Operator **with CSI driver** :  
`kubectl apply -f https://github.com/Dynatrace/dynatrace-operator/releases/download/v1.7.0/kubernetes-csi.yaml`
- Below command is only to update the Dynatrace Operator **without CSI driver** :  
`kubectl apply -f https://github.com/Dynatrace/dynatrace-operator/releases/download/v1.7.0/kubernetes.yaml`

# Enabling [Logs on k8s](https://docs.dynatrace.com/docs/shortlink/lma-logs-from-kubernetes)

1. Enable log module feature flag Collect all Container Logs in cluster Settings \> Log monitoring \> Log module feature flags.
2. In your Dynakube, add `.spec.logMonitoring: {}` , which Dynatrace Operator uses to create an unconditional log ingest rule in the cluster settings \> Log monitoring \> Log ingest rules.
  1. You may set granular ingest rules with [Dynakube parameter](https://docs.dynatrace.com/docs/ingest-from/setup-on-k8s/reference/dynakube-parameters#log-monitoring-ingest-rule-matchers) `.spec.logMonitoring.ingestRuleMatchers`, which only supports storage include rules with k8s matchers.
  2. You may override the Dynatrace Operator created log ingest rule(s) with your own [log ingest rules](https://docs.dynatrace.com/docs/shortlink/lma-log-ingest-rules#log-ingest-rule) in Dynatrace at the cluster scope or a scope closer to the node, like in host settings. We recommend matchers for k8s, content or level attributes in Log ingest rule settings in Dynatrace. [Storage exclude rules](https://docs.dynatrace.com/docs/shortlink/lma-log-ingest-rules#example-exclude) are also supported for more granular control of ingest, for example, exclude from storage, logs containing [supported severity keywords](https://docs.dynatrace.com/docs/shortlink/lma-log-data-transformation-oa#log-severity) like **trace**.

3. In your Dynakube, change `apiVerson` to `v1beta5`
4. Steps 4.1 and 4.2 are mutually exclusive; complete one step but not both. Dynatrace Operator will not deploy our logMonitoring workload on clusters with our OneAgent workload in mode Cloud Native Fullstack, because Fullstack OneAgents include LogAnalytics for log monitoring.
  1. **Required only for Logs on k8s with** **[App-only](https://github.com/Dynatrace/dynatrace-operator/blob/main/assets/samples/dynakube/v1beta5/applicationMonitoring.yaml)**  **or** **[Standalone](https://github.com/Dynatrace/dynatrace-operator/blob/main/assets/samples/dynakube/v1beta5/logMonitoring.yaml)**  
In your Dynakube, add `.spec.templates.logMonitoring` with imageRef params.  
_Check our latest logMonitoring image in [ECR Public Gallery](https://gallery.ecr.aws/dynatrace/dynatrace-logmodule). We recommend deploying one of the most recent versioned images, like 1.321 as of September 2025. `latest` is not currently an existing tag for our official logMonitoring images stored in public repositories._

  2. **Logs on k8s with** **[Cloud Native Fullstack OneAgent](https://github.com/Dynatrace/dynatrace-operator/blob/main/assets/samples/dynakube/v1beta5/cloudNativeFullStack.yaml)**  
[Update OneAgent](https://docs.dynatrace.com/docs/ingest-from/dynatrace-oneagent/oneagent-update). We recommend one of the [two latest releases](https://docs.dynatrace.com/docs/shortlink/release-notes-oneagent).

5. Check that Dynakube feature flag `feature.dynatrace.com/automatic-kubernetes-api-monitoring` was not set to false.
6. Check that `kubernetes-monitoring` was added to the [list of ActiveGate capabilities](https://docs.dynatrace.com/docs/ingest-from/setup-on-k8s/reference/dynakube-parameters#active-gate) in `.spec.activeGate.capabilities` of your Dynakube.

# Resolution

In Dynatrace, we should see logs attached on the monitored k8s entity pages in the Kubernetes app and we can also filter logs by any of these fields in [DQL](https://docs.dynatrace.com/docs/shortlink/dql-dynatrace-query-language-hub) (Grail) or [DSQL](https://docs.dynatrace.com/docs/analyze-explore-automate/log-monitoring/analyze-log-data/log-viewer#sql) (Logs classic).

- [OpenPipeline limits — Dynatrace Docs](https://docs.dynatrace.com/docs/shortlink/openpipeline-limits#entity-related-fields)
- [Automatic log enrichment — Dynatrace Docs](https://docs.dynatrace.com/docs/shortlink/lma-log-data-transformation-oa#autoattributes)

Field log.source is set to **Container Output**. Field **dt.source\_entity** is set to the containerized process(es) that output the logs to the pod’s stdout/err streams. If the process details are unavailable, available entity ids like the cloud application instance of the pod entity page may be used to set the **dt.source\_entity** field.

 ![Logs in context of a k8s cluster monitored on a Dynatrace Demo environment.](https://global.discourse-cdn.com/dynatrace/original/3X/a/a/aa0a177b4847ff073267e09f7de1c61b19a1ffb3.png)

# What’s next

If you encounter any unexpected behavior with the deployment change or missing log ingest, please [collect the Dynatrace Operator archive](https://docs.dynatrace.com/docs/shortlink/installation-k8s-troubleshooting#support-archive), write a description of your issue with results of above steps and link the cluster in your Dynatrace environment on a [support ticket](https://one.dynatrace.com) with Dynatrace Support.

```hljs
kubectl exec -n dynatrace deployment/dynatrace-operator -- dynatrace-operator support-archive --stdout > operator-support-archive.zip

```

A [notebook share access link](https://docs.dynatrace.com/docs/shortlink/share-documents#document-share-link) with edit permissions showing the query used can also help Dynatrace Support verify provided your issue description and start our investigation.

---

<div class="post-metadata">

**Author:** ![gopher](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/gopher/32/5728_2.png) [@gopher](https://community.dynatrace.com/u/gopher)\
**Post date:** [September 11, 2025, 11:37pm UTC](https://community.dynatrace.com/t/logs-ingest-on-k8s-with-dynatrace/53313/2 "2025-09-11T23:37:11Z")

</div>

[@jgrant](https://community.dynatrace.com/user/54714)&nbsp;thanks for the post - This is the closest thing to a document that has been created for this, it was fun figuring it out without this.  
Would be good to see this actually documented in the official documents.  
Current documentation leaves allot to be desired.

I do have one concern about the log module - I can’t be bothered raising yet another Enhancement Request.  
Logs ingested via the logs module has a different base tag for Kubernetes clusters compared to existing events and log ingestion from the active gate.

Active Gate Kubernetes events and logs use :&nbsp; dt.kuberenetes.cluster.name&nbsp;  
Log Module logs use :&nbsp; k8s.cluster.name

This means that looking at k8s logs and k8s events can’t be done in the same query and makes investigating issues painful due to the filtering.&nbsp;  
when investigating issues in k8s, it is important to see both the cluster, namespace, workload level events in direct comparison with the application logs.

Thanks

---

<div class="post-metadata">

**Author:** ![jgrant](https://avatars.discourse-cdn.com/v4/letter/j/8edcca/32.png) [@jgrant](https://community.dynatrace.com/u/jgrant)\
**Post date:** [October 10, 2025, 4:43pm UTC](https://community.dynatrace.com/t/logs-ingest-on-k8s-with-dynatrace/53313/3 "2025-10-10T16:43:38Z")

</div>

Hi&nbsp;[@gopher](https://community.dynatrace.com/user/10565)

Thank you for sharing your feedback, which I shared with our product team for Logs.

---

<div class="post-metadata">

**Author:** ![mattcanty](https://avatars.discourse-cdn.com/v4/letter/m/b3f665/32.png) [@mattcanty](https://community.dynatrace.com/u/mattcanty)\
**Post date:** [December 17, 2025, 2:44pm UTC](https://community.dynatrace.com/t/logs-ingest-on-k8s-with-dynatrace/53313/4 "2025-12-17T14:44:26Z")

</div>

How do I validate that&nbsp;.spec.logMonitoring: {} has been picked up correctly.

I have an on-going issue with log ingestion and wondering if it is the ommitting of this causing the problem.

---

<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:** [December 17, 2025, 2:46pm UTC](https://community.dynatrace.com/t/logs-ingest-on-k8s-with-dynatrace/53313/5 "2025-12-17T14:46:29Z")

</div>

[@mattcanty](https://community.dynatrace.com/user/97927)&nbsp; can you decribe what issues you have with log monitoring and what deployment do you have?

---

<div class="post-metadata">

**Author:** ![mattcanty](https://avatars.discourse-cdn.com/v4/letter/m/b3f665/32.png) [@mattcanty](https://community.dynatrace.com/u/mattcanty)\
**Post date:** [December 17, 2025, 3:09pm UTC](https://community.dynatrace.com/t/logs-ingest-on-k8s-with-dynatrace/53313/6 "2025-12-17T15:09:07Z")

</div>

[@Julius\_Loman](https://community.dynatrace.com/user/3364)&nbsp;[https://community.dynatrace.com/t5/Dynatrace-Managed-Q-A/Inconsistent-Logs-Dynatrace-Managed/m-p/291699#M4612](https://community.dynatrace.com/post/291699#M4612)
