Kubecost · Schema

Kubecost Allocation

A cost allocation record for a Kubernetes workload, containing resource usage metrics and associated costs for CPU, GPU, RAM, storage, network, and load balancers over a given time window.

Cloud CostCost MonitoringKubernetesOptimizationSpending

Properties

Name Type Description
name string Name of the allocation.
properties object Kubernetes metadata properties associated with this allocation.
window object The time window for this allocation.
start string Start time of the allocation.
end string End time of the allocation.
cpuCores number Number of CPU cores allocated.
cpuCoreRequestAverage number Average CPU core request over the window.
cpuCoreUsageAverage number Average CPU core usage over the window.
cpuCoreHours number Total CPU core-hours consumed.
cpuCost number Total cost attributed to CPU usage.
cpuCostAdjustment number Adjustment applied to CPU cost.
cpuEfficiency number CPU efficiency ratio (usage / request).
gpuCount number Number of GPUs allocated.
gpuHours number Total GPU-hours consumed.
gpuCost number Total cost attributed to GPU usage.
gpuCostAdjustment number Adjustment applied to GPU cost.
networkTransferBytes number Total network bytes transferred.
networkReceiveBytes number Total network bytes received.
networkCost number Total cost attributed to network usage.
networkCostAdjustment number Adjustment applied to network cost.
loadBalancerCost number Total cost attributed to load balancers.
loadBalancerCostAdjustment number Adjustment applied to load balancer cost.
pvBytes number Persistent volume bytes allocated.
pvByteHours number Total persistent volume byte-hours consumed.
pvCost number Total cost attributed to persistent volumes.
pvCostAdjustment number Adjustment applied to persistent volume cost.
ramBytes number RAM bytes allocated.
ramByteRequestAverage number Average RAM byte request over the window.
ramByteUsageAverage number Average RAM byte usage over the window.
ramByteHours number Total RAM byte-hours consumed.
ramCost number Total cost attributed to RAM usage.
ramCostAdjustment number Adjustment applied to RAM cost.
ramEfficiency number RAM efficiency ratio (usage / request).
externalCost number External (out-of-cluster) costs attributed to this allocation.
sharedCost number Shared costs attributed to this allocation.
totalCost number Total cost for this allocation.
totalEfficiency number Overall efficiency ratio across all resources.
View JSON Schema on GitHub

JSON Schema

allocation.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://github.com/api-evangelist/kubecost/blob/main/json-schema/allocation.json",
  "title": "Kubecost Allocation",
  "description": "A cost allocation record for a Kubernetes workload, containing resource usage metrics and associated costs for CPU, GPU, RAM, storage, network, and load balancers over a given time window.",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Name of the allocation."
    },
    "properties": {
      "type": "object",
      "description": "Kubernetes metadata properties associated with this allocation.",
      "properties": {
        "cluster": {
          "type": "string",
          "description": "Cluster name."
        },
        "node": {
          "type": "string",
          "description": "Node name."
        },
        "namespace": {
          "type": "string",
          "description": "Namespace name."
        },
        "controller": {
          "type": "string",
          "description": "Controller name."
        },
        "controllerKind": {
          "type": "string",
          "description": "Kind of controller (e.g. Deployment, StatefulSet, DaemonSet)."
        },
        "pod": {
          "type": "string",
          "description": "Pod name."
        },
        "container": {
          "type": "string",
          "description": "Container name."
        },
        "labels": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "Kubernetes labels applied to the workload."
        },
        "annotations": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "Kubernetes annotations applied to the workload."
        },
        "services": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Kubernetes services associated with the workload."
        }
      }
    },
    "window": {
      "type": "object",
      "description": "The time window for this allocation.",
      "properties": {
        "start": {
          "type": "string",
          "format": "date-time",
          "description": "Start of the allocation window."
        },
        "end": {
          "type": "string",
          "format": "date-time",
          "description": "End of the allocation window."
        }
      }
    },
    "start": {
      "type": "string",
      "format": "date-time",
      "description": "Start time of the allocation."
    },
    "end": {
      "type": "string",
      "format": "date-time",
      "description": "End time of the allocation."
    },
    "cpuCores": {
      "type": "number",
      "description": "Number of CPU cores allocated."
    },
    "cpuCoreRequestAverage": {
      "type": "number",
      "description": "Average CPU core request over the window."
    },
    "cpuCoreUsageAverage": {
      "type": "number",
      "description": "Average CPU core usage over the window."
    },
    "cpuCoreHours": {
      "type": "number",
      "description": "Total CPU core-hours consumed."
    },
    "cpuCost": {
      "type": "number",
      "description": "Total cost attributed to CPU usage."
    },
    "cpuCostAdjustment": {
      "type": "number",
      "description": "Adjustment applied to CPU cost."
    },
    "cpuEfficiency": {
      "type": "number",
      "description": "CPU efficiency ratio (usage / request)."
    },
    "gpuCount": {
      "type": "number",
      "description": "Number of GPUs allocated."
    },
    "gpuHours": {
      "type": "number",
      "description": "Total GPU-hours consumed."
    },
    "gpuCost": {
      "type": "number",
      "description": "Total cost attributed to GPU usage."
    },
    "gpuCostAdjustment": {
      "type": "number",
      "description": "Adjustment applied to GPU cost."
    },
    "networkTransferBytes": {
      "type": "number",
      "description": "Total network bytes transferred."
    },
    "networkReceiveBytes": {
      "type": "number",
      "description": "Total network bytes received."
    },
    "networkCost": {
      "type": "number",
      "description": "Total cost attributed to network usage."
    },
    "networkCostAdjustment": {
      "type": "number",
      "description": "Adjustment applied to network cost."
    },
    "loadBalancerCost": {
      "type": "number",
      "description": "Total cost attributed to load balancers."
    },
    "loadBalancerCostAdjustment": {
      "type": "number",
      "description": "Adjustment applied to load balancer cost."
    },
    "pvBytes": {
      "type": "number",
      "description": "Persistent volume bytes allocated."
    },
    "pvByteHours": {
      "type": "number",
      "description": "Total persistent volume byte-hours consumed."
    },
    "pvCost": {
      "type": "number",
      "description": "Total cost attributed to persistent volumes."
    },
    "pvCostAdjustment": {
      "type": "number",
      "description": "Adjustment applied to persistent volume cost."
    },
    "ramBytes": {
      "type": "number",
      "description": "RAM bytes allocated."
    },
    "ramByteRequestAverage": {
      "type": "number",
      "description": "Average RAM byte request over the window."
    },
    "ramByteUsageAverage": {
      "type": "number",
      "description": "Average RAM byte usage over the window."
    },
    "ramByteHours": {
      "type": "number",
      "description": "Total RAM byte-hours consumed."
    },
    "ramCost": {
      "type": "number",
      "description": "Total cost attributed to RAM usage."
    },
    "ramCostAdjustment": {
      "type": "number",
      "description": "Adjustment applied to RAM cost."
    },
    "ramEfficiency": {
      "type": "number",
      "description": "RAM efficiency ratio (usage / request)."
    },
    "externalCost": {
      "type": "number",
      "description": "External (out-of-cluster) costs attributed to this allocation."
    },
    "sharedCost": {
      "type": "number",
      "description": "Shared costs attributed to this allocation."
    },
    "totalCost": {
      "type": "number",
      "description": "Total cost for this allocation."
    },
    "totalEfficiency": {
      "type": "number",
      "description": "Overall efficiency ratio across all resources."
    }
  }
}