Kubernetes Logs and Events Cheat Sheet/Dump cluster info to a directory

Collect cluster state to files instead of stdout.

Section: Incident Collection

Dump cluster info to a directory

bash
bash
kubectl cluster-info dump --output-directory=./cluster-dump

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 Incident Collection
Export object YAML during incident
Capture the exact spec and status for later analysis.
OpenIn sheetbashsame section
Save pod logs to a file
Persist logs for investigation or attachment to a ticket.
OpenIn sheetbashsame section
Get pod logs
Print logs from the default container in a pod.
Read logs via deployment resource
Print logs from a workload resource instead of a single pod.
List namespace events
See the recent warning and normal events in a namespace.
Read logs from kube-system pods
Aggregate logs from a system component by label.