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¶
Show cluster details¶
Create a cluster¶
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¶
Request body
Delete a cluster¶
List cluster templates¶
Show cluster template details¶
Create a cluster template¶
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"
}