Collects comprehensive diagnostic information from a Kubernetes cluster including pod logs, resource descriptions, and deployment configuration (with sensitive data redacted).
The debug tool requires Python dependencies to run. During the initial deployment, a virtual environment was created at deployment/erag-venv/. You can reuse this environment:
cd deployment/
source erag-venv/bin/activateIf the virtual environment was deleted or is no longer available, you can recreate it following the instructions below.
If the virtual environment doesn't exist or needs to be recreated:
cd deployment/
sudo apt-get install python3-venv
python3 -m venv erag-venv
source erag-venv/bin/activate
pip install -r requirements.txtAfter running these commands, the virtual environment will be ready to use for future runs.
cd deployment/
python tools/debug_tool.py --config /path/to/config.yaml [--output-dir <dir>]--config(required): Path to the deployment configuration file (same file used during deployment). Must include thekubeconfigvariable pointing to a valid kubeconfig file. The kubeconfig path can be absolute or relative to the config file location.--output-dir(optional): Output directory for debug bundle. Defaults todebug_bundle. A timestamp is appended to create a unique directory.
kubectl_logs/: Pod logs organized by namespace (current and previous)kubectl_get/:kubectl get -o wideoutput per resource typekubectl_getyaml/:kubectl get -o yamloutput per resource typekubectl_describe/:kubectl describeoutput per resource typetopology_preview_report.yaml: Topology preview report fromdeployment/ansible-logs/(if available)config_redacted.yaml: Deployment config with sensitive values redacted (if provided)ansible.log: Ansible deployment log (if available)SUMMARY.json: Quick overview of collected datadebug_tool_execution.log: Complete log of debug tool execution
Note: ConfigMaps and Secrets are only listed via
kubectl get(no yaml/describe) to avoid exposing sensitive data. Note: If a deployment config is provided via--config, all sensitive fields (tokens, passwords, keys, etc.) are automatically redacted before saving.
- Check
kubectl_logs/{namespace}/{pod}_previous.logfor crash details - Review
kubectl_get/events.txtfor related events
- Check
kubectl_get/nodes.txtandkubectl_describe/nodes.txtfor node details - Review logs for slow response times
- Check
kubectl_get/pvc.txt,kubectl_get/pv.txtandkubectl_get/sc.txt - Review
kubectl_getyaml/pvc.txtfor detailed PVC/PV configuration - Look for storage-related events in
kubectl_get/events.txt
- Review
kubectl_get/networkpolicies.txtandkubectl_getyaml/networkpolicies.txt - Check
kubectl_get/services.txtandkubectl_get/ingress.txt - Look for network-related errors in pod logs