kubectlDebugging

kubectl logs

Prints the logs from a container in a pod.

Syntax

kubectl logs [-f] <pod> [-c <container>]

Examples

Follow logs from a specific container

kubectl logs -f api-7d9f8-x2k1p -c app