Get a Kubernetes cluster's metrics

Get the cluster's metrics over time. Defaults to the last hour. A range longer than one day returns hourly averages.

GET https://{availability_zone}.betterstackcloud.com/v1/kubernetes-clusters/{id}/metrics
id string required

The ID of the Kubernetes cluster.

from datetime

The start of the range. Defaults to one hour before to. In ISO 8601 format, such as 2026-07-01T12:00:00Z.

to datetime

The end of the range. Defaults to now. Must be after from, and the range can be up to 366 days. In ISO 8601 format, such as 2026-07-01T12:00:00Z.

Authorization string required

Bearer $TOKEN

200 OK
{
  "data": [
    {
      "at": "2026-07-01T12:00:00.000Z",
      "nodes_ready": 1,
      "nodes_total": 1,
      "pods_running": 1,
      "pods_capacity": 1,
      "apiserver_up": 1.5
    }
  ],
  "meta": {
    "from": "2026-07-01T12:00:00.000Z",
    "to": "2026-07-01T12:00:00.000Z",
    "resolution": "raw"
  }
}

Returns the data points, and the time range and resolution we used.

at datetime

The time of the data point, or the hour it averages. In ISO 8601 format, such as 2026-07-01T12:00:00Z.

nodes_ready integer

How many workers were ready. Hourly averages are rounded.

nodes_total integer

How many workers the cluster had. Hourly averages are rounded.

pods_running integer

How many pods were running. Hourly averages are rounded.

pods_capacity integer

How many pods the workers can run. Hourly averages are rounded.

apiserver_up number

How available the Kubernetes API was, from 0 to 1.

meta.from datetime

The start of the range we used. In ISO 8601 format, such as 2026-07-01T12:00:00Z.

meta.to datetime

The end of the range we used. In ISO 8601 format, such as 2026-07-01T12:00:00Z.

meta.resolution string

How far apart the data points are.
Valid values:
raw: Each data point is one measurement.
hour: Each data point is the average of one hour.