Clusters
Manage your account's clusters
List Clusters
GET https://api.mckube.dev/clusters
This endpoint lists all the clusters that exist, or previously existed, in the current account.
Headers
Authorization
string
A valid API key, prefixed with Bearer
[
{
"createdAt": "2020-06-06T13:25:22.81141+01:00",
"duration": 5,
"expiresAt": "2020-06-06T18:27:36.212484+01:00",
"id": "53e307bc-6589-47ba-9c7e-f7eed9587d8a",
"kubeconfig": null,
"name": "Cluster 1",
"status": "terminated"
},
{
"createdAt": "2020-06-07T14:07:01.876654+01:00",
"duration": 24,
"expiresAt": "2020-06-08T14:07:07.01062+01:00",
"id": "009f2a04-4b19-4578-ab6d-1ae4ec22d980",
"kubeconfig": "{}",
"name": "Cluster 2",
"status": "active"
}
]Create Cluster
POST https://api.mckube.dev/clusters
This endpoint is used to create new clusters, using the provided name and duration.
Headers
Authorization
string
A valid API key, prefixed with Bearer
Request Body
duration
integer
How long the cluster should live for, in hours
name
string
A descriptive name for the cluster
{
"id": "12345"
}{
"title": "Bad Request",
"detail": "No cluster name was given",
"status": 400
}{
"title": "Payment Required",
"detail": "You do not have enough credits to launch a cluster for 12 hours",
"status": 402
}Get Cluster
GET https://api.mckube.dev/clusters/:id
This endpoints gets information about a previously-created cluster. It can also be used to poll whilst waiting for cluster provisioning to complete.
Path Parameters
id
string
The ID of the cluster to load
Headers
Authorization
string
A valid API key, prefixed with Bearer
{
"createdAt": "2020-06-07T14:07:01.876654+01:00",
"duration": 24,
"expiresAt": null,
"id": "009f2a04-4b19-4578-ab6d-1ae4ec22d980",
"kubeconfig": null,
"name": "A cluster",
"status": "pending"
}{
"createdAt": "2020-06-07T14:07:01.876654+01:00",
"duration": 24,
"expiresAt": "2020-06-08T14:08:24.23823+01:00",
"id": "009f2a04-4b19-4578-ab6d-1ae4ec22d980",
"kubeconfig": "{}",
"name": "A cluster",
"status": "active"
}Terminate Cluster
DELETE https://api.mckube.dev/clusters/:id
This endpoint instantly terminates a cluster. Note: If a cluster is terminated early using this endpoint, no credits are refunded and you are still billed for the requested cluster duration.
Path Parameters
id
string
The ID of the cluster to terminate
Headers
Authorization
string
A valid API key, prefixed with Bearer
Last updated
Was this helpful?