Helm charts
Install and configure Cast AI components in your Kubernetes cluster using Helm charts.
Installing Cast AI components with Helm
This guide explains how to install Cast AI components using Helm charts. While our onboarding script automates most installations, you may prefer manual installation for greater control or customization.
Prerequisites
- Helm installed
- Access to your Kubernetes cluster
- Full Access Cast AI API key
Add the Cast AI Helm repository
Add the Cast AI Helm repository and update your local chart information:
helm repo add castai-helm https://castai.github.io/helm-charts
helm repo updateInstall components
Read-only mode for EKS, GKE, and AKS
Install the core Cast AI agent in read-only mode:
helm upgrade -i castai-agent castai-helm/castai-agent -n castai-agent \
--set apiKey="<your-api-key>" \
--set provider="<eks|gke|aks>"Replace <your-api-key> with your Cast AI API key and <eks|gke|aks> with your cloud provider.
In case of any problems with connecting to the Cast AI console, please check the relevant entry in our Troubleshooting guide.
Autoscaling components
Here is a list of commands for installing components required for autoscaling with Helm:
Cluster controller
To install the castai-cluster-controller, i.e., the component for executing different Kubernetes-related operations, run the following command:
helm upgrade -i cluster-controller castai-helm/castai-cluster-controller -n castai-agent \
--set castai.apiKey="\<replace_with_your_api_key>" \
--set castai.clusterID=\<replace_with_castai_cluster_id>For AKS clusters, add --set aks.enabled=true:
helm upgrade -i cluster-controller castai-helm/castai-cluster-controller -n castai-agent \
--set castai.apiKey="\<replace_with_your_api_key>" \
--set castai.clusterID=\<replace_with_castai_cluster_id> \
--set aks.enabled=trueSpot Handler
Spot Handler monitors Spot Instance interruption events and reports them to Cast AI to improve spot reliability models. To learn more, visit Spot Handler documentation or our GitHub.
To install the spot-handler component for handling Spot interruptions, run the following command:
helm upgrade -i castai-spot-handler castai-helm/castai-spot-handler -n castai-agent \
--set castai.apiURL=https://api.cast.ai \
--set castai.clusterID="<your-cluster-id>" \
--set castai.provider="<aws|azure|gcp>"Replace <aws|azure|gcp> with your cloud provider.
Evictor
To install Evictor to reduce the cluster size, run the following command:
helm upgrade -i castai-evictor castai-helm/castai-evictor -n castai-agent --set dryRun=falseWith Container Live Migration support (AWS EKS only):
helm upgrade -i castai-evictor castai-helm/castai-evictor -n castai-agent \
--set dryRun=false \
--set liveMigration.enabled=trueAdditional Evictor configuration options:
# Enable aggressive mode
helm upgrade -i castai-evictor castai-helm/castai-evictor -n castai-agent \
--set dryRun=false,aggressiveMode=true
# Enable scoped mode
helm upgrade -i castai-evictor castai-helm/castai-evictor -n castai-agent \
--set dryRun=false,scopedMode=true
# Combined with Container Live Migration
helm upgrade -i castai-evictor castai-helm/castai-evictor -n castai-agent \
--set dryRun=false,aggressiveMode=true,liveMigration.enabled=trueLearn more about bin-packing and Evictor. For Container Live Migration requirements and setup, see Container Live Migration documentation.
Kvisor
To install the Security posture assessment agent, called kvisor, run the following command:
NoteIf your cluster is in the EU region, update the
apiURLto:kvisor.prod-eu.cast.ai:443
helm upgrade -i castai-kvisor castai-helm/castai-kvisor -n castai-agent \
--set castai.apiURL=https://api.cast.ai \
--set castai.clusterID="<your-cluster-id>" \
--set structuredConfig.provider="<eks|aks|gcp>" \
--set castai.apiKey="<your-api-key>"Replace <eks|aks|gcp> with your cloud provider.
To learn more about the capabilities of Cast AI's security posture management solution and how it helps you be sure to head to our Security section.
AI Enabler Proxy
helm upgrade -i castai-ai-optimizer-proxy castai-helm/castai-ai-optimizer-proxy -n castai-agent \
--set castai.apiKey="<your-api-key>" \
--set castai.clusterID="<your-cluster-id>"
--set castai.apiURL=<API_URL> \
--set createNamespace=trueContainer Live Migration specific installations
Container Live Migration components are typically installed automatically when a cluster is onboarded, but you can also install them manually for advanced configurations.
Live Migration Controller
The live migration controller is automatically installed when Container Live Migration is enabled in your node templates. For manual installation:
helm upgrade -i castai-live-controller castai-helm/castai-live-controller -n castai-agent \
--set castai.apiKey="<your-api-key>" \
--set castai.clusterID="<your-cluster-id>"Updating Evictor for Live Migration
If you have an existing Evictor installation and want to enable Container Live Migration support:
helm upgrade castai-evictor castai-helm/castai-evictor -n castai-agent \
--set liveMigration.enabled=true \
--reuse-valuesCustomize installations
Each Cast AI Helm chart supports various configuration options. Refer to the Cast AI Helm charts repository for detailed value descriptions and examples.
To customize an installation, create a values.yaml file with your desired settings and use the -f flag:
helm upgrade -i <release-name> castai-helm/<chart-name> -n castai-agent -f values.yamlExample values.yaml for Evictor with Live Migration
# values.yaml
dryRun: false
aggressiveMode: true
scopedMode: false
liveMigration:
enabled: true
nodeGracePeriodMinutes: 10Apply the configuration:
helm upgrade -i castai-evictor castai-helm/castai-evictor -n castai-agent -f values.yamlUpdated 9 days ago
