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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"clusterId": "<clusterId>",
"namespace": "<namespace>",
"pod": "<pod>"
},
"name": "azure_aks_pod_logs"
}
}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. |