Create a Kubernetes snapshot

Create a snapshot of a Kubernetes cluster's control plane. We create it shortly after the response.

POST https://{availability_zone}.betterstackcloud.com/v1/kubernetes-clusters/{kubernetes_cluster_id}/snapshots
kubernetes_cluster_id string required

The ID of the Kubernetes cluster.

Authorization string required

Bearer $TOKEN

Content-Type string

application/json

name string

The snapshot's name, at most 255 characters. Defaults to the cluster's name followed by the date and time, such as prod-20261124-093000.

202 Accepted
{
  "id": "example",
  "name": "Example Kubernetes snapshot",
  "server_id": "123456789",
  "snapshot_type": "manual",
  "status": "pending",
  "size_bytes": 1,
  "availability_zone": "example",
  "failure_reason": "example",
  "lock": {
    "reason": "fraud",
    "details": "example",
    "locked_at": "2026-07-01T12:00:00.000Z"
  },
  "created_at": "2026-07-01T12:00:00.000Z",
  "updated_at": "2026-07-01T12:00:00.000Z",
  "metadata": {
    "example": "value"
  }
}

Returns the newly created Kubernetes snapshot.

id string

The snapshot's ID, a UUID.

name string

The snapshot's name, at most 255 characters.

server_id string or null

The ID of the server that runs the cluster's control plane. You can't change that server directly.

snapshot_type string

How the snapshot was created.
Valid values:
manual: You created the snapshot, or we created it before an upgrade.
scheduled: A snapshot schedule created it.

status string

The snapshot's state. To follow a new snapshot, list the cluster's snapshots until it's no longer pending.
Valid values:
pending: We're creating the snapshot.
available: The snapshot is ready, and you can restore it.
failed: We couldn't create the snapshot. failure_reason says why.
deleting: We're deleting the snapshot.

size_bytes integer or null

The size of the control plane's disk when the snapshot was taken, in bytes. We bill this size. Stays null until the snapshot is ready.

availability_zone string or null

The zone the snapshot was taken in, which is the cluster's zone.

failure_reason string or null

Why the snapshot failed, or null unless the snapshot failed.

lock object or null

Our lock on the snapshot, or null.

lock.reason string

Possible values: fraud, non_payment, abuse, legal, security, maintenance, other.

lock.details string or null

The details.

lock.locked_at datetime

In ISO 8601 format, such as 2026-07-01T12:00:00Z.

created_at datetime

When the snapshot was created. In ISO 8601 format, such as 2026-07-01T12:00:00Z.

updated_at datetime

When the snapshot was last updated. In ISO 8601 format, such as 2026-07-01T12:00:00Z.

metadata object

The snapshot's tags, as string pairs. You can't set them on a Kubernetes snapshot.