Skip to main content

How to debug AKS pods

# Follow logs for a specific pod
kubectl logs -n internal-platform <pod-name> -f

# Logs for all pods with a label
kubectl logs -n internal-platform -l app=astra-backend --tail=100

# Previous container logs (after crash)
kubectl logs -n internal-platform <pod-name> --previous

Common errors

Pod stuck in Pending

  • Check: kubectl describe pod -n <ns> <pod> — look for scheduling errors
  • Common cause: Insufficient resources on nodes

Pod in CrashLoopBackOff

  • Check: kubectl logs -n <ns> <pod> --previous — see crash output
  • Common cause: Missing environment variables or database connection failure

Pod in ImagePullBackOff

  • Check: kubectl describe pod -n <ns> <pod> — look for ACR auth errors
  • Fix: az acr login --name aucertacr41e0x5

What's next