Provider Connectors
How clusters are priced
Where each cluster's cost comes from on AWS, Google Cloud and Azure, and how to price a cluster that has no cloud bill.
LevelFour prices every node from your own bill, never from a list price. It then splits each node's cost across the containers that ran on it, by what each requested or used. The capacity no container requested is the node's idle cost.
| Where the cluster runs | Priced from | What LevelFour needs |
|---|---|---|
| Amazon EKS | The Cost and Usage Report, amortized, per EC2 instance | The AWS account connected, with detailed cost data |
| Google Kubernetes Engine | The Cloud Billing detailed export, net of committed and sustained use credits, per Compute Engine instance | The project connected, with the Detailed usage cost export |
| Azure Kubernetes Service | The Azure cost export, amortized, per virtual machine scale set | The subscription connected, with billing data |
| Anywhere else | The hourly prices you set | Node prices on the cluster's Nodes tab |
The agent tells the clouds apart by each node's provider ID. A node whose provider ID names none of the three clouds belongs to a cluster with no cloud bill.
A day the bill has not covered yet reads as not yet priced, and fills in when the bill arrives.
Amortized and net
The Kubernetes pages show each cost amortized, as the bill lists it before your enterprise discount. The LevelFour API also returns the cost of clusters, namespaces, workloads and containers net of that discount and of your commitments, beside the amortized one, as the field's _net sibling: cost_net, idle_cost_net, cpu_cost_net, potential_savings.monthly_net and the rest.
- Amazon EKS: the net comes from the Cost and Usage Report's net amortized cost for each instance and day. A bill with no discount reads the same on both.
- Google Kubernetes Engine: the detailed export is already net of credits, so both fields hold the same cost.
- Idle: each basis splits its own node cost, so the containers and the idle cost add up to the nodes on both.
- Older days: a day LevelFour rolled up before it kept the net reads its amortized cost in both fields.
- Order and shares: sorting, the top lists and each item's share of the cost stay on the amortized cost.
- Amortized only, for now: node costs other than network, volumes, network destinations and node pools.
Purchase options
On AWS, LevelFour reads each instance's purchase option from the bill: On-Demand, Spot, Reserved Instance or Savings Plan. On Google Cloud, LevelFour tells Spot and preemptible instances apart by their SKU in the export. On Azure, a node is Spot when its kubernetes.azure.com/priority label, or the older kubernetes.azure.com/scalesetpriority label, says spot, and On-Demand otherwise (AKS node labels).
Google Kubernetes Engine
Each GKE node is a Compute Engine instance with its own rows in the detailed export, credits included, so LevelFour reads that instance's compute cost for the day.
The Standard usage cost export has no per-resource rows, so a GKE cluster on it shows usage without prices.
Azure Kubernetes Service
Azure bills a node pool's virtual machine scale set as one resource (Azure VM usage). Each node gets the scale set's cost for the day in proportion to the hours it ran.
Price a cluster with no cloud bill
A cluster on bare metal, in your own data center, or on a distribution whose nodes report no cloud provider ID has no bill for LevelFour to read. Set an hourly price for its nodes, and LevelFour prices the cluster from it.
Open the cluster's Nodes tab
Open Kubernetes, pick the cluster, and open the Nodes tab. The Node prices card appears on a cluster with no cloud bill, once its agent has reported.
Set the prices
Price nodes one at a time by name, or many at once by a label they carry, such as node.kubernetes.io/instance-type=metal-large. Each price is in US dollars an hour. A list holds up to 500 prices.
A node's own price wins. Otherwise the first label price in the list that matches the node applies, so put the most specific labels first.
Wait for the next rollup
Prices apply within about 12 hours, to the last three days and every day after. Days further back keep the price they had. Clearing the list leaves the cluster's nodes unpriced from then on.
Setting node prices takes the Admin role.
Clusters without the agent
A cluster that does not run the agent can still show cost per namespace when its bill carries the split itself. Clusters without the agent covers EKS split cost allocation and GKE cost allocation.
Install with GitOps
Connect many Kubernetes clusters with one organization install key, a Secret from your secret manager, and the LevelFour chart deployed by Argo CD, Flux or Terraform.
Clusters without the agent
See cost per namespace for an Amazon EKS or Google Kubernetes Engine cluster that does not run the LevelFour agent, from the cost allocation data in your bill.