Skip to content

Kubernetes service API reference

In these methods, {cluster_id} and {clustertemplate_id} are placeholders that should be replaced with the actual IDs of the cluster and cluster template, respectively. The request bodies for creating and updating clusters and templates should include the appropriate properties and values based on the specific requirements of the container orchestration engine and the desired configuration of the cluster.

List clusters

Bash
GET /v1/clusters

Show cluster details

Bash
GET /v1/clusters/{cluster_id}

Create a cluster

Bash
POST /v1/clusters

Request body

JSON
{
  "cluster_template_id": "Cluster Template ID",
  "name": "Cluster Name",
  "master_count": Number of Master Nodes,
  "node_count": Number of Worker Nodes,
  "keypair": "Keypair Name",
  "labels": {
    key": "value"
  }
}

Update a cluster

Bash
PATCH /v1/clusters/{cluster_id}

Request body

JSON
{
 "op": "replace",
 "path": "/property",
 "value": "New Value"
}

Delete a cluster

Bash
DELETE /v1/clusters/{cluster_id}

List cluster templates

Bash
GET /v1/clustertemplates

Show cluster template details

Bash
GET /v1/clustertemplates/{clustertemplate_id}

Create a cluster template

Bash
POST /v1/clustertemplates

Request cody

JSON
{
 "name": "Template Name",
 "image_id": "Image ID",
 "keypair_id": "Keypair ID",
 "external_network_id": "External Network ID",
 "dns_nameserver": "DNS Nameserver",
 "flavor_id": "Flavor ID",
 "master_flavor_id": "Master Flavor ID",
 "docker_volume_size": Docker Volume Size in GB,
 "network_driver": "Network Driver",
 "volume_driver": "Volume Driver",
 "coe": "Container Orchestration Engine"
}

Update a cluster template

Bash
 PATCH /v1/clustertemplates/{clustertemplate_id}
 ```

Request body
```json
{
 "op": "replace",
 "path": "/property",
 "value": "New Value"
}

Delete a cluster template

Bash
DELETE /v1/clustertemplates/{clustertemplate_id}