This example demonstrates a full CloudPilot AI deployment with both Node Autoscaler and Workload Autoscaler, including custom nodeclasses, nodepools, recommendation policies, autoscaling policies, and proactive optimization filters.
- Installs the CloudPilot AI Node Autoscaler with rebalance enabled
- Configures a custom NodeClass (
cloudpilot) with 30 GiB system disk - Configures a NodePool (
cloudpilot-general) with spot and on-demand capacity - Defines a workload for optimization
- Deploys the Workload Autoscaler with:
- Two recommendation policies (
balancedandcost-savings) - Two autoscaling policies (
default-apwith inplace mode andreadonlywith off mode) - Proactive optimization enabled for
defaultandmy-namespacenamespaces - Proactive optimization disabled for
kube-systemnamespace
- Two recommendation policies (
- Terraform >= 1.0
- AWS CLI configured with EKS permissions
- kubectl for cluster operations
- A CloudPilot AI API key -- see Getting API Keys
-
Create a
terraform.tfvarsfile:cloudpilot_api_key = "your-api-key" cluster_name = "my-eks-cluster" region = "us-west-2" restore_node_number = 3 enable_rebalance = true
-
Apply the configuration:
terraform init terraform plan terraform apply
- Modify
recommendation_policiesandautoscaling_policiesinmain.tfto tune optimization behavior - Adjust
nodeclassesandnodepoolsfor different instance types, architectures, or capacity strategies - Update
enable_proactive/disable_proactiveto control which namespaces get proactive optimization