DevOps · Command
kubectl logs
Print logs for a container in a pod or supported resource. You can stream logs, choose a container, read previous logs, or limit the output.
Last updated
Syntax
kubectl logs [-f] [-p] (POD | TYPE/NAME) [-c CONTAINER]In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
kubectl getkubectl describekubectl eventskubectl execkubectl attach