| name | castai-debug-bundle |
| description | Collect CAST AI diagnostic bundle for support tickets and troubleshooting.
Use when preparing a support case, collecting agent logs,
or building a diagnostic snapshot of cluster state.
Trigger with phrases like "cast ai debug", "cast ai support bundle",
"collect cast ai diagnostics", "cast ai logs".
|
| allowed-tools | Read, Bash(kubectl:*), Bash(curl:*), Bash(tar:*), Bash(helm:*), Grep |
| version | 1.4.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","kubernetes","cost-optimization","castai"] |
| compatibility | Designed for Claude Code |
CAST AI Debug Bundle
Overview
Collect all CAST AI component logs, cluster state, and configuration into a single archive for troubleshooting or support tickets. The bundle captures agent status, Helm releases, autoscaler policies, node inventory, and recent events.
Prerequisites
kubectl access to the cluster running CAST AI
CASTAI_API_KEY and CASTAI_CLUSTER_ID configured
helm installed
Instructions
Step 1: Run the Debug Bundle Script
#!/bin/bash
set -euo pipefail
BUNDLE_DIR="castai-debug-$(date +%Y%m%d-%H%M%S)"
mkdir -p "$BUNDLE_DIR"
echo "=== CAST AI Debug Bundle ===" | tee "$BUNDLE_DIR/summary.txt"
echo "Generated: $(date -u)" | tee -a "$BUNDLE_DIR/summary.txt"
echo "Cluster ID: ${CASTAI_CLUSTER_ID:-unknown}" | tee -a "$BUNDLE_DIR/summary.txt"
echo "--- Helm Releases ---" >> "$BUNDLE_DIR/summary.txt"
helm list -n castai-agent -o yaml > "$BUNDLE_DIR/helm-releases.yaml" 2>&1
echo "--- Pod Status ---" >> "$BUNDLE_DIR/summary.txt"
kubectl get pods -n castai-agent -o wide > "/pod-status.txt" 2>&1
deploy castai-agent cluster-controller castai-evictor castai-spot-handler castai-workload-autoscaler;
kubectl logs -n castai-agent --=200 \
> 2>&1 || >>
kubectl get events -n castai-agent --sort-by= \
> 2>&1
kubectl get nodes -o wide > 2>&1
[ -n ] && [ -n ];
curl -s -H \
\
| jq \
> 2>&1
curl -s -H \
\
> 2>&1
kubectl get clusterrole -l app.kubernetes.io/managed-by=castai \
> 2>&1
tar -czf
-rf