For the complete documentation index, see llms.txt. This page is also available as Markdown.
Via Terraform and Helm
Learn how to set up and configure Harness Cluster Orchestrator for AWS EKS using Terraform and Helm
What's New?
Cluster Orchestrator now supports Karpenter 1.7.3 features. Users must re-run the Terraform template and perform a Helm upgrade to add new permissions for Cluster Orchestrator related to Karpenter 1.7.3.
Before You Begin
For complete prerequisites, required tools, environment variables, and AWS/Kubernetes permissions, see the Installation Guide.
Quick Prerequisites Checklist
AWS Account with permissions to create IAM roles and policies
EKS Cluster running and accessible via kubectl
Helm 3.x or later installed on your local machine
Terraform 1.2.0 or later installed on your local machine
Harness Account with CACM module enabled
Kubernetes Connector configured in your Harness account
Required for provisioning spot instances. Create this role in your AWS account before enabling Cluster Orchestrator:
This is an AWS account-level role, not specific to individual EKS clusters. Without this role, new nodes will fall back to on-demand instances instead of spot instances. For more information, see AWS Spot Instance Service-Linked Roles.
Implementation Steps
Step 1: Set Up Required Infrastructure with Terraform
First, we'll use Terraform to set up the required infrastructure components:
AWS IAM roles and policies with proper permissions
Resource tagging for subnets, security groups, and AMIs
Harness service accounts and API tokens
If you are re-running the enablement script or Terraform template Cluster Orchestrator related to Karpenter 1.7.3
As part of onboarding script or Helm upgrade, CRDs for Nodepools, EC2NodeClass, and NodeClaims will be upgraded. If using GitOps, users have to manually upgrade the CRDs:
Save the above template to a file named cluster-orchestrator.tf
Update the placeholder values in the default blocks with your actual EKS cluster and Harness account information
Initialize and apply the Terraform configuration:
Important Terraform Outputs
After successful execution, Terraform will generate several outputs required for the Helm installation:
Output
Description
harness_ccm_token
The Harness CACM token (sensitive value)
eks_cluster_controller_role_arn
The ARN for the EKS cluster controller role
eks_cluster_default_instance_profile
The name of the default EC2 instance profile
eks_cluster_node_role_arn
The ARN for the node IAM role
harness_cluster_orchestrator_id
The Cluster Orchestrator ID
Step 2: Configure Helm for Cluster Orchestrator Installation
1. Add the Harness CACM Cluster Orchestrator Helm Repository
2. Update the Helm Repository
Step 3: Install the Cluster Orchestrator
1. Retrieve the Terraform Output Values
To get the sensitive token value, run:
For other values, you can run:
2. Install the Helm Chart
Use the following command to install the Cluster Orchestrator, replacing the placeholders with values from your Terraform outputs:
Troubleshooting
Missing OIDC Provider
If your cluster doesn't have an OIDC provider ARN configured, you can create one with the following command:
Verifying Installation
Check if the Cluster Orchestrator pods are running correctly:
Why are instances with AL2023 AMIs not joining the cluster as nodes?
Default configuration in the harness-default ec2nodeclass is set to use the AL2 AMI family. Updating it to AL2023 enables support for AL2023 AMIs, allowing new instances to successfully join the cluster. 🛠️ Steps to fix:
Run the following command to edit the node class configuration:
In the spec section, locate the amiFamily field.
Replace AL2 with AL2023.
Save and exit the editor.
After making this change, newly provisioned instances using AL2023 AMIs will properly join the cluster as nodes.
Next Steps
After successful installation:
Navigate to the Harness CACM module to verify the Cluster Orchestrator is connected
Configure optimization policies in the Harness CACM UI
Monitor your cluster for cost optimizations in the Harness dashboard