Cost Events Audit API
Note: This feature is in a beta state. It has limitations. Please read the documentation carefully.
Note: This feature is only officially supported on Kubecost Enterprise plans.
The Cost Events Audit API aims to offer improved visibility on recent changes at cluster level and their estimated cost impact.
Cost events Audit API
This API is disabled by default. It needs to be manually enabled first through Helm, using the following parameters:
.Values.costEventsAudit.enabled = true
You can also enable the Cost Events Audit API by setting the
COST_EVENTS_AUDIT_ENABLEDenvironment variable to
Changes at cluster level can range from actions triggered by declarative statements submitted by users (e.g. creation of a Deployment) to automated actions (e.g. cluster autoscaling) or performance events. We detect changes that would have an impact on the overall cluster cost using watchers on the Kubernetes API client.
The watchers are tracking change events across all namespaces within the local/primary cluster (the cluster that the instance of Kubecost you are interacting with via HTTP is running on).
- Deployment creation
- Deployment deletion
Note: This page will be updated as more event types are supported.
Cost implications of cluster events are handled by passing the Kubernetes spec inferred from the change event to the Kubecost Predict API.
- The Cost Events Audit API can return up to 1000 of the most recent cluster events. There is no time expiration limit on the events.
- Events returned by the Cost Events Audit API are currently not persisted between Kubecost pod restarts.
- The Cost Events Audit API does not track events for clusters other than the local/primary cluster.