Follow logs live while reproducing an issue.
Section: Logs, Exec, and Ephemeral Debugging
Stream logs
bash
bash
kubectl logs -f <pod> -n <namespace>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 Logs, Exec, and Ephemeral Debugging
Open a shell in a running container
Run commands inside a pod for live inspection.
Inspect environment variables
Quickly validate environment and injected secrets names.