/v1/kubernetes/clustersQueues a new Kubernetes cluster and returns 202 Accepted with the operation_id of the
create operation. The cluster and its nodes start in provisioning. Poll
Get an operation or
Get a cluster until the cluster is running.
Every field except name is optional:
| Field | Default |
|---|---|
version | v1.36.2+k3s1 |
image_slug | ubuntu-2404-lts |
control_plane_plan_slug | scale |
worker_plan_slug | launch |
worker_count | 1 |
Things to know:
- The cluster runs in the default zone,
olas-closet. - Cluster names must be unique in the workspace. Uniqueness is checked on the slug of the
name, so
Productionandproductionclash. - Node names are derived from the cluster name:
<name>-cp-1for the control plane and<name>-worker-1,<name>-worker-2and so on for workers. - The API
endpointhas the formhttps://<slug>-<id>.k8s.rumptycloud.com:16443, where<id>is a short fragment of the cluster'suid. - Compute plans must be available. An unavailable plan returns
400(this compute plan is not available). - Past-due and suspended accounts get
402. X-Idempotencyis optional. A retry with a key you already used for a cluster create returns the original operation with200 OK,is_replay: trueand theX-Idempotency-Replayheader, and nothing new is queued. The replay is checked first (before billing, validation and the name check), so a retry after the cluster was created does not fail with409for the name. The same key with a differentnamereturns409withaction: idempotency_key_reused. Without a key, a retry of a create that already succeeded returns409because the name is taken.
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.
X-IdempotencystringOptional unique key for this request, such as a UUID. Leading and trailing spaces are
trimmed. If you send a key you already used for the same action on the same cluster, the
original operation is returned with 200 OK, is_replay: true and the
X-Idempotency-Replay header, and nothing new is queued. The replay is checked before the
cluster's current state. Reusing a key for a different action or resource returns 409
with action: idempotency_key_reused. Keys are scoped to you and the workspace and shared
by every resource type.
Request body
namestringRequiredDisplay name of the cluster. Leading and trailing spaces are trimmed. Its slug must be unique among the workspace's clusters.
versionstringk3s version to install. The API passes it to the provisioner without validating it.
Default v1.36.2+k3s1
image_slugstringSlug of the node operating system image. Case-insensitive. Must be an enabled image from List images, except the default ubuntu-2404-lts, which can be used even when it is hidden from the VM catalog.
Default ubuntu-2404-lts
control_plane_plan_slugstringCompute plan for the control-plane node. Case-insensitive. Must be a compute plan from List plans.
Default scale
worker_plan_slugstringCompute plan for every worker node. Case-insensitive. Must be a compute plan from List plans.
Default launch
worker_countintegerNumber of worker nodes. 0, negative values or an omitted field mean 1. Values above 3 are rejected.
Default 1min 1 · max 3
ssh_key_uidsarray of stringsUIDs of SSH keys to install on every node. Optional. Each key must be yours or belong to the workspace.
Response
The create operation was queued.
successbooleanRequiredtrue when the request succeeded.
messagestringRequiredHuman-readable status message.
dataobjectShow attributesHide attributes
operation_idstringRequiredUID of the queued operation. Pass it to Get an operation.
clusterobjectRequiredShow attributesHide 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).
statusstringRequiredThe cluster's status after the request was accepted, provisioning for a create or deleting for a delete. On a replay it is the cluster's current status (deleted once it is gone). This is not the operation's status; use is_completed or Get an operation for that.
events_urlstringRequiredPath of the server-sent events stream with the operation's progress.
is_replaybooleanRequiredtrue when an existing operation was returned for a reused X-Idempotency key.
is_completedbooleantrue when a replayed operation has already finished. Omitted unless true.
Response
Replay. The X-Idempotency key was already used for this action, so the existing
operation is returned and nothing is queued. cluster and status show the cluster as it
is now (deleted once it is gone). cluster includes kubeconfig when one exists and you
have the secrets.read permission; otherwise it is empty and kubeconfig_restricted is
true.
successbooleanRequiredtrue when the request succeeded.
messagestringRequiredHuman-readable status message.
dataobjectShow attributesHide attributes
operation_idstringRequiredUID of the queued operation. Pass it to Get an operation.
clusterobjectRequiredShow attributesHide 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).
statusstringRequiredThe cluster's status after the request was accepted, provisioning for a create or deleting for a delete. On a replay it is the cluster's current status (deleted once it is gone). This is not the operation's status; use is_completed or Get an operation for that.
events_urlstringRequiredPath of the server-sent events stream with the operation's progress.
is_replaybooleanRequiredtrue when an existing operation was returned for a reused X-Idempotency key.
is_completedbooleantrue when a replayed operation has already finished. Omitted unless true.
Errors
| Status | Meaning |
|---|---|
400 | Validation failed. Possible messages: invalid request (malformed JSON or missing name), name is required (blank name), worker_count cannot exceed 3, invalid compute plan, this compute plan is not available, invalid image, or invalid ssh key. |
401 | The API key is missing, invalid, expired or revoked. |
402 | The account is past due, so new paid resources cannot be created. |
403 | You cannot access the workspace, your role does not allow this action, or the account is suspended. |
409 | A cluster with the same name slug already exists in the workspace (cluster name already exists), or the X-Idempotency key was already used for a different operation (action: idempotency_key_reused). |
Errors use the standard error format.