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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly