A pod named 'web-app' is experiencing high CPU usage. You want to investigate which process inside the container is consuming the most CPU. Which command should you run?
Trap 1: kubectl logs -f web-app
Streams logs, not useful for CPU investigation.
Trap 2: kubectl describe node
Shows node-level resource allocation and conditions, not per-process.
Trap 3: kubectl top pod web-app
Shows overall CPU/memory usage of the pod, not per-process.
- A
kubectl logs -f web-app
Why wrong: Streams logs, not useful for CPU investigation.
- B
kubectl exec web-app -- top
Executes 'top' inside the container, showing per-process CPU usage.
- C
kubectl describe node
Why wrong: Shows node-level resource allocation and conditions, not per-process.
- D
kubectl top pod web-app
Why wrong: Shows overall CPU/memory usage of the pod, not per-process.