Azure AKS application logs for the application running in Pod from Azure Portal

0 votes
We can see pod-related logs using Log Analytics Workspace, but no app logs are available (similar to what we see in kubectl get events).

Despite consulting the Azure documentation, I am still unable to see Application Pod logs via the Azure Portal.
Mar 4, 2022 in Azure by Edureka
• 12,690 points
1,210 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

The important thing to remember is that logs and meta-data are dispersed across numerous "tables," requiring joins to retrieve the information you need. ContainerLog table (where logs are saved) and KubePodInventory (where container / pod metadata is maintained) are typically used.
We may create a query to get all logs from all pods, starting with the most recent ones, for the most basic part:

letstartTimestamp=ago(1h);
KubePodInventory
| where TimeGenerated > startTimestamp
| project ContainerID, PodName=Name
| distinct ContainerID, PodName
| join
(
ContainerLog
| where TimeGenerated > startTimestamp
)
on ContainerID
// at this point before the next pipe, columns from both tables are available to be "projected". Due to both
// tables having a "Name" column, we assign an alias as PodName to one column which we actually want
| project TimeGenerated, PodName, LogEntry, LogEntrySource
| order by TimeGenerated desc
answered Mar 4, 2022 by Edureka
• 13,620 points

edited Mar 5

Related Questions In Azure

0 votes
0 answers

Windows Azure Portal login to portal and receive error "We are having trouble logging you into the portal"

Open browser Navigate to http://www.windowsazure.com/en-us/ Select portal top right login with ...READ MORE

Mar 2, 2022 in Azure by Edureka
• 13,620 points
847 views
0 votes
1 answer

Azure Pricing Calculator for Hours in Cloud Service

The best method to understand Cloud Service ...READ MORE

answered Mar 29, 2022 in Azure by Edureka
• 12,690 points
885 views
0 votes
1 answer

DMZ kind of network design in the AKS

It sounds like you want to implement ...READ MORE

answered Feb 17, 2023 in AWS by sarit
• 1,830 points
891 views
0 votes
1 answer

How To login to azure kubernetes cluster?

Run az login to authenticate to Azure. Run az aks get-credentials to ...READ MORE

answered Apr 1, 2022 in Azure by Edureka
• 12,690 points
3,892 views
0 votes
1 answer

Azure application insights or log analytics

Insights into Applications Application Insights is an ...READ MORE

answered Mar 25, 2022 in Azure by Edureka
• 13,620 points
1,277 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP