Kubernetes
Medium
Commands
Which command would you use to view the logs of a specific container in a multi-container pod?
Select your answer:
Show answer and explanation
Answer: kubectl logs <pod-name> -c <container-name>
Explanation
The 'kubectl logs <pod-name> -c <container-name>' command allows you to view the logs of a specific container in a multi-container pod. This is useful when a pod has multiple containers and you need to debug or monitor a specific container.