| name | castai-common-errors |
| description | Diagnose and fix CAST AI agent, API, and autoscaler errors.
Use when the CAST AI agent is offline, nodes are not scaling,
or API calls return errors.
Trigger with phrases like "cast ai error", "cast ai not working",
"cast ai agent offline", "cast ai debug", "fix cast ai".
|
| allowed-tools | Read, Bash(kubectl:*), Bash(curl:*), 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 Common Errors
Overview
Diagnostic guide for the 10 most common CAST AI issues, covering agent connectivity, API errors, autoscaler failures, and node provisioning problems.
Prerequisites
kubectl access to the cluster
CASTAI_API_KEY configured
- Access to CAST AI console for log correlation
Error Reference
1. Agent Pod CrashLoopBackOff
kubectl get pods -n castai-agent
kubectl logs -n castai-agent deployment/castai-agent --tail=50
Causes and fixes:
- Invalid API key: Regenerate at console.cast.ai > API
- Wrong provider: Set
--set provider=eks|gke|aks correctly in Helm
- RBAC missing: Apply the required ClusterRole and ClusterRoleBinding
- Network blocked: Ensure outbound HTTPS to
api.cast.ai is allowed
2. Agent Shows "Disconnected" in Console
kubectl logs -n castai-agent deployment/castai-agent | grep -i "heartbeat\|connect\|error"
kubectl run castai-debug --image=curlimages/curl --rm -it --restart=Never -- \
curl -s -o /dev/null -w "%{http_code}" https://api.cast.ai/v1/kubernetes/external-clusters
Fix: Restart the agent pod: kubectl rollout restart deployment/castai-agent -n castai-agent
3. API Returns 401 Unauthorized
curl -s -o /dev/null -w "%{http_code}" \
-H "X-API-Key: ${CASTAI_API_KEY}" \
https://api.cast.ai/v1/kubernetes/external-clusters
Fix: Generate a new API key at console.cast.ai > API > API Access Keys.
4. Nodes Not Scaling Up (Unschedulable Pods)
kubectl get pods --all-namespaces --field-selector=status.phase=Pending
curl -s -H \
\
| jq