Skip to content
masterclass Buddy

Kubernetes · Command

kubectl logs

Reads logs from a container in a pod or supported resource. It can show a snapshot, stream new output, inspect a previous container, or select multiple pods.

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.

Subscribe
  • kubectl exec
  • kubectl describe
  • kubectl events
  • kubectl port-forward
  • kubectl top

Source: kubectl logs | Kubernetes. Checked 2026-11-03.