Cloud Cost Management (CCM) FAQs
This article addresses some frequently asked questions about Harness Cloud Cost Management (CCM).
AWS connectors
Do I need to create an AWS connector for all my linked accounts?
No. You can create an AWS connector in the master or linked account. CCM requires one connector per AWS account (master or linked).
It is recommended to create a CUR at the master account to avoid the CUR creation step for each linked account. For more information, see AWS connector requirements and Cost and Usage Reports (CUR) and CCM requirements.
What kind of access does Harness CCM need to the cost and usage reports (CUR)?
If you have a consolidated billing process enabled, then CCM needs read-only access to the cost and usage reports (CUR) stored in the S3 bucket in the master or payer account. This gives access to the cost data for all the accounts (linked/member) in the organization.
If you don't have consolidated billing enabled at the organization level, then you can create the CUR at a linked account level.
How does data flow from the source S3 bucket to CCM?
Read this article to understand the flow of data from the S3 bucket to CCM.
Do I need to create a CloudFormation stack?
Yes. You need to create a CloudFormation stack to provision IAM Roles and corresponding policies to grant access for the required features.
Do you import the data into your account?
The CUR reports are imported into our account. CCM stores them securely with read-only access.
How long does it take to show AWS billing data in CCM? Why?
AWS ingests data at source (S3 bucket) multiple times a day. CCM takes up to twenty four hours to make the data available for viewing and analysis once it is available at the source. However, during that time, partial data might be available for viewing. For reporting purposes, if latest timestamp is used, it will pull in the data for current data as well which may be partial as the sync may happen later. For best overall reporting, it's recommended to use a prior day.
What AWS access permissions/policies are required for CCM?
See AWS access permissions for the details.
To save on S3 storage costs, can I delete CUR files from the source S3 bucket after they've been ingested in CCM?
Yes, the CUR files can be deleted. However, it is recommended that you store the last 6 months of data on the source. CCM keeps a copy of the raw CUR files.
Do I require a delegate to connect to AWS?
No. You need a delegate only when connecting to a Kubernetes cluster, such as one running on EKS. ECS cluster costs are pulled through IAM roles.
What types of access do you get to my accounts?
CCM gets read-only access to the cost data along with a list of all the member (or linked) accounts. CCM does not get access to any other privileges. However, for AutoStopping, CCM requires additional privileged permissions to orchestrate the underlying infrastructure. See AWS resource optimization using AutoStopping rules.
Can CCM get historical data from the CUR?
Yes, CCM can sync the entire data if CUR files are available at the source. If a new CUR file is made available at source (even for previous months), CCM will sync and correct the data.
Azure connectors
Can I create multiple Azure connectors for each Harness Account?
Yes, you can create multiple Azure connectors for each Harness Account.
- You can create multiple Azure connectors per Azure Tenant with unique subscription IDs.
- If you have separate billing exports for each of your subscriptions in your Azure account, set up separate connectors in Harness to view the cloud cost of all the subscriptions in CCM.
- See Set up Cloud Cost Management for Azure.
What types of access do you get to my accounts?
CCM gets only read permissions to the storage account in which the billing data export is available.
How long does it take to show Azure billing data in CCM? Why?
Azure ingests data at source (storage account) once a day. CCM takes about two hours to make the data available for viewing and analysis once it is available at the source.
How does data flow from the source storage account to CCM?
Read this article to understand the flow of data from the Azure storage account to CCM.
Do I require a delegate to connect to Azure?
No. You need a delegate only when connecting to a Kubernetes cluster, such as one running in AKS.
To save on the storage costs, can I delete the billing export from the source storage account after they've been ingested in CCM?
Yes, the billing export can be deleted. However, it is recommended that you store the last 6 months of data on the source. CCM keeps a copy of the raw billing export.
Can CCM get historical data from CUR?
Yes, CCM can sync the entire data if CUR files are available at the source without any limits. If a new CUR file is made available at source (even for previous months), CCM will sync and correct the data.
The Azure connector fails in the validation step and the message “Authorization permission mismatch” is displayed. What is the reason?
Sometimes, Azure takes time to refresh the access settings on the storage account. Wait for 3–5 minutes and click the Test button again in Harness.
GCP connectors
How does data flow from the source billing table (GCP) to the CCM?
Read this article to understand the flow of data from GCP to CCM.
How long does it take to show GCP billing data in CCM? Why?
GCP ingests data at source (billing data) at less frequent intervals. CCM takes about two hours to make the data available for viewing and analysis once it is available at the source. For the Non-U.S. regions, it may take slightly longer to show up the data.
Do I require a delegate to connect to GCP?
No. You need a delegate only when connecting to a Kubernetes cluster, such as one running in GKE.
Can CCM get historical data from the GCP billing data?
CCM pulls in data for the last 6 months, however, it can be increased further upon request. Contact Harness Support to do so.
Kubernetes cluster connectors
How long do I need to wait before data appears for Kubernetes? Why?
Once you enable CCM, for the first cluster the data is available within a few minutes for viewing and analysis. However, you will not see the idle cost because of the lack of utilization data. CCM generates the last 30 days of the cost data based on the events we collect of the initial cluster state at the time of connecting. From the second cluster onwards, it takes about 2–3 hours for the data to be available for viewing and analysis.
Do I need to add Kubernetes cloud provider connectors for each Kubernetes cluster?
Yes, you need to add a Kubernetes cloud provider for each Kubernetes cluster. One connector can access only one cluster.
Do I need to create a CCM connector for each cluster?
Yes, you need to create a CCM Kubernetes connector for each cluster.
Do I require a delegate in order to connect to Kubernetes?
Yes, you need a delegate to get started with Kubernetes clusters.
Do I need to ensure that the metrics server is installed only for EKS?
Yes. For GKE and AKS, the metrics server is installed by default.
How is the cost calculated for a Kubernetes service/pod?
Node cost:
For GCP, node cost is calculated based on the list pricing API. For AWS and Azure, cost is trued up if the corresponding connector is set up.
Example:
Price per hour of n1-standard-4 in us-central1 from cloud provider pricing API : $0.1900
Cost for 24 hrs : 24 * 0.1900 = $4.56
Pod cost:
Pod request: max(max(init container requests), sum(container requests))
Pod cost : max(cost of resource request, cost of utilized resources)
Pod cost is considered to be a ratio of the node cost it is running on.
Hourly pod cost :
((podCpu/nodeCpu) * nodeCpuPricePerHour ) + ((podMemory/nodeMemory)) * nodeMemoryPricePerHour)
Is the Kubernetes pod request or limit considered for cost calculations or actual utilization of resources by pod?
Yes, see this formula:
Pod cost : max(cost of resource request, cost of utilized resources)
How does Harness handle scenarios where the cost for pods changes depending on instance type?
In AWS/Azure/GCP, cost should change depending on whether you deploy on the spot instance, on-demand instance, or some reserved instance.
For GCP, Harness identifies the node type the pod is running on and fetches the list pricing.
For AWS/Azure, node cost is trued up from CUR reports. CUR reports take into account RIs, savings plans etc.
How's cost calculated for K8s on cloud providers and K8s on bare metal?
-
For Kubernetes on cloud providers, the cost calculation process relies on the CUR and Billing Export data to obtain the node cost using the
resource-id
. With this information, Harness CCM calculates the pod cost based on the node pricing. However, there might be instances where theresource-id
is not immediately available due to data ingestion delays in the billing reports. In such cases, CCM falls back to using public pricing to calculate the node cost. After the billing report data is ingested, during subsequent runs, the cluster data for previous days are tuned to keep up the updated costs. -
For Kubernetes on bare metal, the cost computation involves using hard-coded values for both node and pod cost calculations.
Compute instance pricing
For spot instances, the CPU price per hour is 0.0032. For on-demand instances, the CPU price per hour is 0.008.
You have the option to set the pricing for compute instances according to your preference. To do so, you need to submit a ticket to Harness Support.
ECS Fargate pricing
For spot instances, the CPU price per hour is 0.00146489. For on-demand instances, the CPU price per hour is 0.00511.
Storage Pricing
Price per hour is computed by using the formula: storageMb * pricePerMbPerHour
AutoStopping Kubernetes cluster
Will the AutoStopping Rule YAML need to replace the ingress we currently use? If so, this might be problematic as we are using external Helm charts.
You do not have to replace your current ingress. The AutoStopping Rule configuration will reference your current ingress by name.
Does AutoStopping support Fargate for EKS?
Yes, AutoStopping supports EKS with Fargate*.*
Namespace in metadata is default. Should it be changed to the one where the target service resides?
Yes, AutoStoppingRule’s namespace should be the namespace in which the service is running.
How to rotate certificate on Autostopping Proxy?
- Create new secrets in the cloud provider for certificate and secret
- Go to the load balancers page
- Edit the Autostopping proxy
- Modify the secrets for certificate and secret
- Save the proxy
Why is user traffic not getting detected when custom exclusion/inclusion is enabled?
-
Please make sure the Access logs are enabled in the ALB
-
Please make sure the Harness role has the following permissions
s3:ListBucket
s3:GetObject
s3:ListAllMyBuckets
s3:GetBucketLocation
How do we onboard and access RDS instance/cluster to Autostopping?
- Access the RDS cluster through Autostopping proxy. The steps to connect using proxy is available in the Autostopping rule details page. As long as someone connects to the RDS cluster through proxy, Harness will keep the RDS cluster running.
- OR create an uptime fixed schedule for the RDS cluster for the working hours. Harness makes sure that cluster is up and running during the uptime schedule
- OR Use the RDS Autostopping rule as a dependency to another Autostopping rule (For example, Autostopping rule for an EC2). As long as the parent resource (EC2) is running, Harness makes sure that dependent resource (RDS) is running too.
General
Can I create a cloud cost connector at the project level in Harness?
No. CCM connectors are available only at the account level in Harness. Connectors have 3 features (visibility, inventory, and AutoStopping). You must select at least one feature to create a connector.
Does CCM take AWS RI purchases into account?
Yes, CCM reads data from your CUR, which is the source of truth for monthly billing.
Does CCM take into account custom discounts, rewards, or credits?
Yes, if they are part of your billing.
I do not see hourly options when I set a date range beyond seven days?
Hourly granularity can be accessed only for the last seven days.
I have an AWS connector and a Kubernetes connector. Why is my cluster data not available even after a few hours?
In order to true up costs for Kubernetes, we wait until CUR data is also available. If data is not available even after 24 hours, contact Harness Support.
Are connectors shared across Harness FirstGen and Harness NextGen?
No, you must create separate connectors for Harness FirstGen and Harness NextGen.