A pod on AKS keeps restarting. Which command shows why first?
Why C is the answer
kubectl describe pod and kubectl logs
Events and logs show why a container failed, such as image pull errors or crashes.
In detail
- describe shows events and restart reasons.
- logs show what the container printed.
- Add --previous to see logs from the last crash.
Use case
An illustrative scenario, not a real incident.
A pod restarts repeatedly. kubectl describe shows the failing liveness probe, and kubectl logs shows the error behind it.
See it in different ways
mindmap
root((Container hosting))
Container Apps
Serverless
Scale to zero
Revisions
AKS
Full Kubernetes
Node pools
App Service
Simple web API
Deployment slots
Container Registry
Stores images
Build tasksflowchart LR S0["kubectl describe pod"] --> S1["Read events"] --> S2["kubectl logs"] --> S3["Fix the cause"]
Key point: describe and logs show why a pod restarts.
Why the other options are wrong
- A. docker push
- That uploads an image.
- B. az acr repository list
- That lists registry repositories.
- D. az account list
- That lists accounts.

