QuestionQ192

VerifiedKubernetes Fundamentals

If a Pod has multiple containers, how can you view logs from one specific container?

Explanation

kubectl logs supports the --container flag (short form: -c) to select the container whose logs should be displayed, for example: kubectl logs POD_NAME --container CONTAINER_NAME.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!