Kubernetes Logs and Events Cheat Sheet/Follow logs with timestamps

Stream logs with timestamps for incident reconstruction.

Section: Pod Logs

Follow logs with timestamps

bash
bash
kubectl logs -f <pod> -n <namespace> --timestamps

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Pod Logs
Get pod logs
Print logs from the default container in a pod.
OpenIn sheetbashsame section
Get logs from a named container
Required for sidecars and multi-container pods.
OpenIn sheetbashsame section
Tail recent log lines
Limit output while checking current behavior.
OpenIn sheetbashsame section
Read recent logs only
Filter to a recent time window during an incident.
OpenIn sheetbashsame section
Read previous logs after a restart
Useful for restarts and CrashLoopBackOff.
OpenIn sheetbashsame section
Read logs via deployment resource
Print logs from a workload resource instead of a single pod.
OpenIn sheetbash1 tag match