AKS pod logs
azure_aks_pod_logsRetrieve recent logs from an AKS pod container to diagnose issues. Optionally read logs from a crashed previous instance to troubleshoot CrashLoopBackOff.
Instructions
Reads the last log lines of a pod container in an AKS cluster through the Kubernetes API (read-only). Set previous to true to read the logs of the previous, crashed instance of a container in CrashLoopBackOff. Find pod names with azure_aks_workloads.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pod | Yes | Kubernetes pod name. | |
| previous | No | Read logs of the previous (crashed) container instance. | |
| clusterId | Yes | Resource ID of a Microsoft.ContainerService/managedClusters AKS cluster. | |
| container | No | Container name. Required when the pod has more than one container. | |
| namespace | Yes | Kubernetes namespace name. | |
| tailLines | No | Maximum lines (default 200). | |
| sinceMinutes | No | Only lines from the last N minutes. |