/v1/kubernetes/clustersReturns the workspace's Kubernetes clusters, newest first, with their nodes. Deleted clusters are not included. This endpoint is not paginated.
The list never includes kubeconfig (and does not set kubeconfig_restricted). Use
Get a cluster to read it.
Authentication
Send your API key as Authorization: Bearer <token>. The request is scoped to the workspace in X-Workspace-Slug.
Headers
X-Workspace-SlugstringRequiredSlug of the workspace the request acts on. You can also pass it as the workspace_slug query parameter.
Response
The workspace's clusters.
successbooleanRequiredtrue when the request succeeded.
messagestringRequiredHuman-readable status message.
dataarray of objectsShow item attributesHide item attributes
uidstringRequiredUnique identifier of the cluster.
namestringRequiredDisplay name of the cluster.
slugstringRequiredURL-friendly form of the name, unique among the workspace's clusters.
statusstringRequiredLifecycle state. failed means provisioning or a later action failed. See
last_failure. deleted is only seen on Get a cluster
and in idempotent replays.
stopped means the platform powered off every node because the account was suspended
for non-payment. A running cluster switches to stopped (and its nodes to stopped,
which ends node billing) as soon as the stop is queued, and stays stopped while the
account is suspended. Within about a minute of the account becoming active again it is
restarted: it goes through provisioning back to running, or to failed if the
restart fails. If the stop itself fails, the cluster goes back to running and the stop
is retried. A stopped cluster can still be deleted.
One ofprovisioningrunningstoppedfaileddeletingdeleted
display_statusstringRequiredStatus to show in user interfaces. Currently always equal to status.
One ofprovisioningrunningstoppedfaileddeletingdeleted
zone_slugstringRequiredZone the cluster runs in.
versionstringRequiredk3s version requested for the cluster.
image_slugstringSlug of the node operating system image. Omitted if the image cannot be resolved.
endpointstringPublic Kubernetes API server URL. Omitted when the platform has no Kubernetes domain configured.
kubeconfigstringkubeconfig file for the cluster, as YAML text. Omitted until the cluster is running and
the kubeconfig has been retrieved. Never included by List clusters,
and omitted by Get a cluster for roles without the
secrets read permission. It contains credentials, so store it securely.
kubeconfig_restrictedbooleantrue when kubeconfig was withheld because your role lacks the secrets read
permission (viewers). Only set by Get a cluster;
omitted otherwise.
last_failurestringReason for the last failure reported for the cluster. Omitted when there is none.
nodesarray of objectsThe cluster's nodes, the control plane first. Omitted when empty.
Show item attributesHide item attributes
uidstringRequiredUnique identifier of the node.
namestringRequiredNode name, derived from the cluster name, such as production-cp-1 or production-worker-2.
rolestringRequiredWhether the node runs the Kubernetes control plane or workloads.
One ofcontrol-planeworker
statusstringRequiredLifecycle state of the node. stopped while the cluster is stopped for a suspended account.
One ofprovisioningreadystoppedfaileddeletingdeleted
plan_slugstringCompute plan the node runs on.
vcpuintegerVirtual CPUs from the node's plan.
memory_mibintegerMemory from the node's plan, in MiB.
disk_gibintegerDisk included with the node's plan, in GiB.
private_ipstringNode's private IP address. Omitted until the node is provisioned.
guest_usernamestringRequiredOperating system user for SSH access to the node.
created_atstring (date-time)RequiredWhen the cluster was created (RFC 3339).
Errors
| Status | Meaning |
|---|---|
401 | The API key is missing, invalid, expired or revoked. |
403 | You cannot access the workspace, your role does not allow this action, or the account is suspended. |
Errors use the standard error format.