How to export Azure Kubernetes logs to Storage account or view old pod logs from Applications insights?

3/11/2021

In AKS, how to view a deleted pod logs for tracing purposes? Incase of failed logs too would like to store or export the logs.

I have application insights enabled but only the logs of pods currently running can be viewed from there.

I am looking for something like exporting every pod log to a storage account

-- yaja6021
azure
azure-aks
azure-application-insights
azure-monitoring
kubernetes

1 Answer

4/30/2021

If this current configured Application Insights resource is a workspace-based resource already, you can use diagnostic settings for exporting telemetry.

Select Diagnostic settings > add diagnostic setting from within your Application Insights resource. You can select all tables, or a subset of tables to archive to a storage account, or to stream to an Azure Event Hub as convenient.

However, if it is a classic Application Insights resource, you can export telemetry by creating a Continuous Export. However, note that Continuous export has been deprecated and it is recommended to migrate to a workspace-based Application Insights resource to use diagnostic settings.

-- Bhargavi Annadevara
Source: StackOverflow