Kubernetes
Prerequisites
Ingress controller installed. For more information, go to Supported Ingress Controllers for Kubernetes AutoStopping.
Ensure that you have Cluster Autoscaler enabled for EKS with managed node groups.
For EKS:
Ensure that you have access to (Cost Usage Report) CUR. See Review: Cost and Usage Reports (CUR) and CCM Requirements
Permissions to create a cross-account role. See AWS Access Permissions
Installation via Helm
The Autostopping controller can also be installed using Helm. CACM has a comprehensive Helm chart for deploying Harness Cloud & AI Cost Management (CACM) AutoStopping components on Kubernetes clusters.
The Harness CACM AutoStopping Helm Chart provides an automated cost-optimization layer for Kubernetes workloads. It deploys a controller and supporting agents that integrate with Harness Cloud & AI Cost Management to dynamically manage workloads based on usage patterns and traffic activity.
Components
AutoStopping Controller: Manages the lifecycle of AutoStopping rules and reconciles them against cluster workloads.
Progress Agent: Communicates status and progress updates to the Harness platform.
Discovery DaemonSet: Monitors workload and network activity, forwarding traffic metrics to the controller.
Prerequisites
Kubernetes: v1.20 or later
Helm: v3 or later
Harness Delegate: connected to your cluster
Harness CACM Kubernetes Connector configured in your Harness account
Appropriate permissions to create CRDs, ClusterRoles, and Namespaces
Create AutoStopping Rule for Kubernetes
In Harness, navigate to Cloud Costs > AutoStopping Rules and click New AutoStopping Rule. Choose the cloud provider from either AWS (EKS) or GCP (GKE) or Azure (AKS).
Step 1: Configuration

Enter a Name for your rule
AutoStopping Type: Choose how you want your resources to be managed automatically. You can either choose Traffic-based with schedules optionally or Schedules only.
Traffic-based with schedules optionally: Resources automatically stop when idle and restart when traffic is detected. You can configure schedule overrides in advanced settings.
Schedules only: Resources automatically start and stop based on defined schedules. You can configure multiple schedules in advanced settings.
Set the Idle Time - how long an instance should be inactive before stopping
In the Resources to be managed by the AutoStopping rules section, select "Kubernetes Cluster".
Add cluster to be managed by the AutoStopping rule.
Advanced Configuration (Optional):
Hide Progress Page: Toggle this to disable the display of a progress page during instance warm-up.
Dry-Run: Toggle this button if you wish to evaluate the feature without terminating your cloud resources.
Step 2: Setup Access
You can see the resource definition YAML of the Kubernetes AutoStopping Rule that will be applied to the cluster. The specification here is the same as a Kubernetes ingress, with additional Harness metadata. Edit the below template with the right HTTP/HTTPS service details. Validate the YAML to proceed.
*Example YAML:
In this step, update the resource definition YAML of the Kubernetes AutoStopping Rule that will be applied to the cluster.
The specification in the YAML file is the same as a Kubernetes Ingress with additional metadata. These are the configurations to the Ingress that the AutoStopping Rule will create for your Service.
Update the following parameters with the correct HTTP/HTTPS service details:
(Optional) host: Enter the domain name. If a host is provided (for example, app.harness.com), the rule applies to that host. If you do not specify the domain name, the ingress created will match requests to all the domains. name: Enter the name of your Kubernetes service. For example, test. port: Enter the port number. For example, 80. For more information, see The Ingress Resource.
If your workload is non-ingress type, copy the following YAML and edit the metadata. These are the configurations to the Non-Ingress that the AutoStopping Rule will create for your Service.
Edit the metadata with correct service details:
After updating the YAML file with all the details, click Validate YAML.
Click Next once the YAML is validated.
------
Step 3: Review
In Review, verify all the configuration details and click Save Rule. To edit any of the configuration settings, click EDIT and modify the settings.
Your AutoStopping rule is listed under the AutoStopping Rules dashboard.
Cluster AutoStopping Savings Computation
Cluster cost data (trued-up or not trued-up) is considered for savings computation. Savings will be computed in terms of tracked pods under cluster cost data only.
Important points to Remember:
Savings numbers will become precise only after the savings numbers are finalized after the 15th of the next month (after the final settlement). Savings will be recomputed for the previous month on the 15th of the next month to ensure any updates to CUR/billing-export are considered in the final savings numbers for the month.
GCP billing export configured in the billing connector needs to be "detailed".
Azure billing export configured in the billing connector needs to be "amortized".
For cluster-based AutoStopping rules, the corresponding billing-enabled connector of the CSP should be configured in Harness; otherwise, savings computation will be based on public pricing data.
Last updated
Was this helpful?