Observability - Container Logging Flashcards
1
Q
With what command can we see the logs of a running application?
A
‘kubectl logs -f < pod-name>’
-f streams the logs live
2
Q
What happens with the logs command if there are multiple containers within a pod?
A
- you must specify the name of the container in the command
- otherwise it would fail
kubectl logs < pod-name> < container name>
3
Q
A