🔥 3-day streak
Certified Kubernetes Administrator (CKA)60 / 125
Question 60 of 125
A pod named `web-stack` in the `frontend` namespace runs two containers: `nginx` and `log-agent`. Users report the web page returns HTTP 502 errors. You run `kubectl logs web-stack -n frontend` and receive the error: `Error from server (BadRequest): a container name must be specified for pod web-stack`. You need to view only the logs from the `nginx` container to diagnose the 502. Which command retrieves the correct container's logs?
Reviewed for accuracy · Report an issueNext question