Infrastructure as Code (Terraform) to provision an EKS cluster with Karpenter v1 autoscaling, supporting a hybrid architecture (x86/ARM64) and Spot instances.
- Networking: Dedicated VPC (
10.0.0.0/16) with private subnets tagged for Karpenter discovery. - Compute: EKS v1.30 + Karpenter v1.0.
- Cost Efficiency:
- Karpenter NodePool configured for
spotcapacity. - Multi-arch support (
amd64+arm64) to leverage Graviton instances.
- Karpenter NodePool configured for
1. Provisioning Standard Terraform workflow. Ensure AWS credentials are configured.
terraform init
terraform apply2. Access Configure your local kubeconfig:
aws eks update-kubeconfig --region us-east-1 --name opsfleet-demoI've included a test manifest to validate the ARM64/Spot logic.
Trigger Scaling:
kubectl apply -f test-arm-pod.yamlValidate: Check logic in Karpenter controller logs or verify node labels:
# Should show a new ARM64 node with spot capacity
kubectl get nodes -L node.kubernetes.io/instance-type,kubernetes.io/arch,karpenter.sh/capacity-typeterraform destroy