Enable Continuous Efficiency for Kubernetes Clusters By Adding a Delegate

Updated 1 day ago by Archana Singh

Harness Continuous Efficiency (CE) monitors cloud costs of your Kubernetes clusters, namespaces, nodes, workloads, and labels.

In your target infrastructure (Kubernetes cluster) the Harness Delegate may or may not be installed. This topic describes how to enable Continuous Efficiency (CE) for Kubernetes by adding a Delegate.

If the Delegate and Cloud Provider is already installed and added to your infrastructure, see Enable CE for Kubernetes Clusters With an Existing Delegate.

In this topic:

Before You Begin


  • Metrics Server must be running on the Kubernetes cluster where your Harness Kubernetes Delegate is installed. For more information, see Install Kubernetes Metrics Server.
    Metrics Server is installed by default on GKE and AKS clusters, however you need to install it on the AWS EKS cluster.
  • Ensure that you are connected to the Kubernetes cluster. For more information, see Installation Example: Google Cloud Platform.

Step: Connect to Your Kubernetes Cluster

After enabling CE, it takes about 2-3 hours for the data to be available for viewing and analysis.
  1. In Continuous Efficiency, click Settings.
  2. In Cloud Integration, select Add a Kubernetes cluster.
  3. In Download Delegate, enter the name that will appear in CE Explorer to identify this cluster.
  4. Click Download YAML file.
    The YAML file has all the access defined to enable the Harness Kubernetes Delegate to monitor your cluster costs. It also has the Service account details to install and run the Harness Kubernetes Delegate with ClusterRole to access resource metrics.
  5. In the Terminal you used to connect to the Kubernetes cluster, run the following command:

    kubectl apply -f ~/Downloads/harness-delegate-kubernetes.yaml
    Ensure that you are connected to the Kubernetes cluster.
  6. Click Done.

    Once the Delegate is connected to your Kubernetes cluster, the status turns green.
  7. Click Finish.

    The Kubernetes cluster is now listed under Added Kubernetes Clusters.

    As noted earlier, after enabling CE, it takes about 2-3 hours for the data to be available for viewing and analysis. Once CE has data, the cluster is listed in Cost Explorer. The cluster is identified by the Cluster Name you used in the Kubernetes Cloud Provider.


  1. If your Delegate is not created or connected:
    1. Check if your cluster has enough resources (CPU and memory) to install the Delegate. You can use the following command to verify the resource capacity:

      kubectl describe pod test-new-doc-kmpysm-0 -n harness-delegate
    2. Check if the Delegate has all the required permissions. For more information, see Provide CE Permissions to Harness Delegate.

      Next Steps

How did we do?