Skill 1.2.4
Monitor and troubleshoot solutions on AKS and Container Apps by inspecting logs, events, and end-to-end connectivity
Key Concepts
In Container Apps, az containerapp logs show streams console or system logs, and az containerapp exec opens a shell in a running replica. Logs reach Log Analytics in the ContainerAppConsoleLogs_CL table (application output) and the ContainerAppSystemLogs_CL table (platform events such as image pulls, probe failures and scaling). A revision that fails to provision, a target port that does not match the container's listening port, or a failing probe are the most common causes of an unreachable app.
In AKS, kubectl get pods shows status such as Pending, ImagePullBackOff or CrashLoopBackOff; kubectl describe shows the events that explain it; kubectl logs --previous shows the output of a crashed container. Connectivity is tested from inside the cluster with kubectl exec or a temporary debug Pod, by checking that a Service has endpoints and that DNS resolves. Container insights collects logs and metrics into Log Analytics for querying with KQL.