Architecture Available in v1.18.8+
Overview
ScaleOps integrates with Azure Cost Management to provide accurate compute costs by reconciling current Kubernetes spend with your actual Azure bill.
This is done by creating an Azure Cost Export that maintains an up-to-date cost report in Azure Storage (updated by Azure on a daily basis). The report contains the actual cost of each virtual machine, after applying the various discounts - such as Reserved Instances, Savings Plans and Spot instances.
ScaleOps periodically retrieves the report, and updates the current hourly prices of individual nodes accordingly. These prices propagate to the rest of the system, including ‘live’ cost, historical cost reports, etc.
Refer to Azure documentation for further information about Azure Cost Management exports.
Diagram
ScaleOps Managed Application
When running the integration script, ScaleOps will create a service principal in the Azure AD application and will assign the necessary permissions to the service principal.

Self Managed Application
Using self managed application is an alternative way to integrate with Azure.
In this scenario, when running the integration script, ScaleOps will create an Azure AD application and will output the required credentials. You will need pass these credentials to the ScaleOps platform.
See advanced setup for more details.

Calculation of Discounted Prices Based on Azure Cost Data
The daily cost is calculated by averaging the cost per unit per machine.
daily_cost = avg(sum(costBillingQuantity) / sum(quantity))The pricing model is the max quantity of the pricing model by quantity over the last month. For example: If a node ran for 100 hours with a pricing model of Saving Plan and 50 hours as on-demand, the pricing model will be Saving Plan.
Applying Discounted Prices from Azure to Cluster Nodes
Kubernetes cluster nodes are matched with respective Azure virtual machines in the cost export by:
- Azure subscription ID where the cluster is hosted
- Resource ID of the virtual machine (full Azure resource path)
- Instance metadata including resource group and VM name
If the virtual machine does not appear in the report, ScaleOps attempts to infer the price from prices of other similar VMs - e.g., those with same VM size, region and operating system (since the discounts typically apply to VM sizes rather than specific instances).
Known Limitations
- Currently, ScaleOps does not update discounted prices retroactively - meaning that historical prices prior to enablement of the Azure cost integration might not be accurate.
- Cost exports are processed at the subscription level, meaning a cost export data is needed to be setup for each subscription.
- This feature is not available for MicrosoftOnlineServicesProgram (WebDirect) subscriptions, as there are no cost exports that can accommodate the required data.