| name | castai-install-auth |
| description | Install and configure CAST AI agent on a Kubernetes cluster with API key authentication.
Use when onboarding a cluster to CAST AI, setting up Helm charts,
or configuring Terraform provider authentication.
Trigger with phrases like "install cast ai", "connect cluster to cast ai",
"cast ai setup", "cast ai api key", "cast ai helm install".
|
| allowed-tools | Read, Write, Edit, Bash(helm:*), Bash(kubectl:*), Bash(terraform:*), 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 Install & Auth
Overview
Connect a Kubernetes cluster (EKS, GKE, AKS, or KOPS) to CAST AI for cost optimization, autoscaling, and security scanning. Covers API key generation, Helm chart installation of the CAST AI agent, and Terraform provider setup.
Prerequisites
- A running Kubernetes cluster (EKS, GKE, AKS, or KOPS)
kubectl configured with cluster admin access
helm v3 installed
- A CAST AI account at https://console.cast.ai
Instructions
Step 1: Generate an API Key
Log in to https://console.cast.ai and navigate to API > API Access Keys. Create a Full Access key for Terraform-managed clusters, or Read-Only for monitoring-only.
export CASTAI_API_KEY="your-api-key-here"
curl -s -H "X-API-Key: ${CASTAI_API_KEY}" \
https://api.cast.ai/v1/kubernetes/external-clusters | jq '.items | length'
Step 2: Install the CAST AI Agent via Helm
helm repo add castai-helm https://castai.github.io/helm-charts
helm repo update
helm upgrade --install castai-agent castai-helm/castai-agent \
-n castai-agent --create-namespace \
--set apiKey="${CASTAI_API_KEY}" \
--set provider="eks"
kubectl get pods -n castai-agent
Step 3: Enable Full Automation (Phase 2)
export CASTAI_CLUSTER_ID="your-cluster-id"
helm upgrade --install cluster-controller castai-helm/castai-cluster-controller \
-n castai-agent \
--set castai.apiKey="${CASTAI_API_KEY}" \
--set castai.clusterID=
helm upgrade --install castai-evictor castai-helm/castai-evictor \
-n castai-agent \
-- castai.apiKey= \
-- castai.clusterID=
helm upgrade --install castai-spot-handler castai-helm/castai-spot-handler \
-n castai-agent \
-- castai.provider= \
-- castai.clusterID=