From castai-pack
Installs CAST AI agent on Kubernetes clusters via Helm charts or Terraform with API key auth. For EKS/GKE/AKS onboarding, cost optimization, autoscaling.
npx claudepluginhub jeremylongshore/claude-code-plugins-plus-skills --plugin castai-packThis skill is limited to using the following tools:
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.
Deploys CAST AI to EKS, GKE, AKS clusters using Terraform modules for IAM setup, node configuration, and autoscaler policies.
Plans, creates, and configures production-ready Azure Kubernetes Service (AKS) clusters including Day-0 checklists, SKU selection, networking, security, and autoscaling.
Implements Kubernetes cloud cost optimization using Kubecost for visibility, right-sizing, HPA/VPA autoscaling, spot instances, and resource quotas. Use for over-provisioning, misaligned resources, or cost allocation.
Share bugs, ideas, or general feedback.
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.
kubectl configured with cluster admin accesshelm v3 installedLog 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"
# Verify the key works
curl -s -H "X-API-Key: ${CASTAI_API_KEY}" \
https://api.cast.ai/v1/kubernetes/external-clusters | jq '.items | length'
# Add the CAST AI Helm repository
helm repo add castai-helm https://castai.github.io/helm-charts
helm repo update
# Install the read-only monitoring agent (Phase 1)
helm upgrade --install castai-agent castai-helm/castai-agent \
-n castai-agent --create-namespace \
--set apiKey="${CASTAI_API_KEY}" \
--set provider="eks" # eks | gke | aks
kubectl get pods -n castai-agent
export CASTAI_CLUSTER_ID="your-cluster-id"
# Cluster controller -- manages node lifecycle
helm upgrade --install cluster-controller castai-helm/castai-cluster-controller \
-n castai-agent \
--set castai.apiKey="${CASTAI_API_KEY}" \
--set castai.clusterID="${CASTAI_CLUSTER_ID}"
# Evictor -- consolidates underutilized nodes
helm upgrade --install castai-evictor castai-helm/castai-evictor \
-n castai-agent \
--set castai.apiKey="${CASTAI_API_KEY}" \
--set castai.clusterID="${CASTAI_CLUSTER_ID}"
# Spot handler -- graceful spot instance interruption
helm upgrade --install castai-spot-handler castai-helm/castai-spot-handler \
-n castai-agent \
--set castai.provider="eks" \
--set castai.clusterID="${CASTAI_CLUSTER_ID}"
terraform {
required_providers {
castai = {
source = "castai/castai"
version = "~> 7.0"
}
}
}
provider "castai" {
api_token = var.castai_api_token
}
variable "castai_api_token" {
type = string
sensitive = true
}
resource "castai_eks_cluster" "this" {
account_id = data.aws_caller_identity.current.account_id
region = var.aws_region
name = var.cluster_name
}
curl -s -H "X-API-Key: ${CASTAI_API_KEY}" \
"https://api.cast.ai/v1/kubernetes/external-clusters/${CASTAI_CLUSTER_ID}" \
| jq '{name: .name, status: .status, agentStatus: .agentStatus}'
# => { "name": "my-cluster", "status": "ready", "agentStatus": "online" }
| Error | Cause | Solution |
|---|---|---|
401 Unauthorized | Invalid or expired API key | Regenerate at console.cast.ai > API |
403 Forbidden | Key lacks permissions | Use Full Access key for write operations |
Agent CrashLoopBackOff | RBAC misconfiguration | Check kubectl logs -n castai-agent |
cluster not found | Wrong cluster ID | Verify ID at console.cast.ai > Clusters |
| Helm chart not found | Repo not added | Run helm repo add castai-helm ... |
Proceed to castai-hello-world to query cluster savings and node status.