List Kubernetes Clusters
/v1/clustersList all Kubernetes clusters.
Source: list-all-clusters
Request
Sample Request
- cURL
- HTTP
curl -ks -H 'Content-Type: application/json' -H 'X-Auth-Token: gAAAAAB<...>' \
https://api.vietnix.cloud:9513/v1/clusters
GET https://api.vietnix.cloud:9513/v1/clusters
Content-Type: application/json
X-Auth-Token: gAAAAAB<...>
Response
Response Parameters
clustersarrayrequiredThe list of all clusters in Magnum.
statusstringrequiredThe current state of the bay/cluster.
uuidUUIDrequiredThe UUID of the cluster.
linksarrayrequiredLinks to the resources in question.
stack_idUUIDrequiredThe reference UUID of orchestration stack from Heat orchestration service.
namestringrequiredName of the resource.
master_countintegerrequiredThe number of servers that will serve as master for the bay/cluster. The default is 1. Set to more than 1 master to enable High Availability. If the option master-lb-enabled is specified in the baymodel/cluster template, the master servers will be placed in a load balancer pool.
cluster_template_idUUIDrequiredThe UUID of the cluster template.
node_countintegerrequiredThe number of servers that will serve as node in the bay/cluster. The default is 1.
keypairstringrequiredThe name of the SSH keypair to configure in the bay/cluster servers for ssh access. Users will need the key to be able to ssh to the servers in the bay/cluster. The login name is specific to the bay/cluster driver, for example with fedora-atomic image, default login name is fedora.
create_timeoutintegerrequiredThe timeout for cluster creation in minutes. The value expected is a positive integer and the default is 60 minutes. If the timeout is reached during cluster creation process, the operation will be aborted and the cluster status will be set to CREATE_FAILED.
Sample Response
Response body
{
"clusters": [
{
"uuid": "9bd6af9b-d0dd-4083-804e-bfafc3fbd5db",
"name": "kub01",
"cluster_template_id": "6bde0752-643f-46b0-be7e-4fc97573d6c0",
"keypair": "Docs Writter",
"node_count": 1,
"master_count": 1,
"docker_volume_size": 10,
"labels": {
"etcd_lb_disabled": "true",
"heat_container_agent_tag": "5.3.11",
"boot_volume_size": "20",
"boot_volume_type": "e9f2ecf9-697f-4af7-b084-8d4d072d7974",
"cloud_provider_tag": "v1.31.1",
"cloud_provider_enabled": "true",
"cinder_csi_plugin_tag": "v1.31.1",
"csi_snapshotter_tag": "v8.0.1",
"csi_attacher_tag": "v4.6.1",
"docker_volume_type": "e9f2ecf9-697f-4af7-b084-8d4d072d7974",
"flannel_tag": "v0.11.0-amd64",
"cinder_csi_enabled": "true",
"availability_zone": "nova",
"use_podman": "true",
"etcd_tag": "v3.5.13",
"cgroup_driver": "systemd",
"octavia_api_lb_flavor": "",
"octavia_default_flavor": "",
"auto_scaling_enabled": "True",
"cluster_upgrade_method": "replace",
"network_driver": "cilium",
"kube_tag": "v1.31.2",
"kube_version": "v1.31.2",
"hyperkube_image": "docker.io/virtuozzo/hci-binary-hyperkube",
"autoscaler_tag": "1.31.0",
"coredns_tag": "1.11.3",
"k8s_keystone_auth_tag": "v1.31.1",
"cilium_tag": "v1.16.3",
"container_runtime": "containerd",
"monitoring_enabled": "False",
"minion_floating_ip_disabled": "True",
"cilium_routing_mode": "native"
},
"master_flavor_id": "medium.2c.4g",
"flavor_id": "small.1c.2g",
"create_timeout": 60,
"links": [
{
"href": "https://api.vietnix.cloud:9513/v1/clusters/9bd6af9b-d0dd-4083-804e-bfafc3fbd5db",
"rel": "self"
},
{
"href": "https://api.vietnix.cloud:9513/clusters/9bd6af9b-d0dd-4083-804e-bfafc3fbd5db",
"rel": "bookmark"
}
],
"stack_id": "652ec709-7c1f-4cbe-b925-cad8de90e706",
"status": "CREATE_COMPLETE",
"health_status": "HEALTHY",
"merge_labels": false,
"template_delete_on_termination": false,
"nodegroups": [
{
"uuid": "c7c82b3b-c0ed-4540-a0b1-90af9d9deaba",
"name": "default-master",
"flavor_id": "medium.2c.4g",
"image_id": "d275727a-a1c9-4d71-8180-adadc7fc266b",
"node_count": 1,
"role": "master",
"min_node_count": 0,
"max_node_count": null,
"is_default": true,
"stack_id": "652ec709-7c1f-4cbe-b925-cad8de90e706",
"status": "CREATE_COMPLETE",
"merge_labels": false,
"server_group_id": "1504f1ba-b0e3-4824-b976-60b2fa2bfe79",
"nodes": {
"0": "2ededa48-21ff-4049-acdc-a3dd5791946d"
},
"coe_version": "v1.31.2"
},
{
"uuid": "fd769417-6a19-4705-aa5d-8d59e56faaf6",
"name": "default-worker",
"flavor_id": "small.1c.2g",
"image_id": "d275727a-a1c9-4d71-8180-adadc7fc266b",
"node_count": 1,
"role": "worker",
"min_node_count": 0,
"max_node_count": null,
"is_default": true,
"stack_id": "652ec709-7c1f-4cbe-b925-cad8de90e706",
"status": "CREATE_COMPLETE",
"merge_labels": false,
"server_group_id": "c6d7f95b-d675-41d4-bed4-61a5981855c3",
"nodes": {
"0": "815d7d9b-758e-4a24-9896-8bdcba1a448c"
},
"coe_version": "v1.31.2"
}
]
}
]
}
Status Code
Success
| Status Code | Description |
|---|---|
| 200 - OK | Request was successful. |
Error
| Status Code | Description |
|---|---|
| 401 - Unauthorized | User must authenticate before making a request. |
| 403 - Forbidden | Policy does not allow current user to do this operation. |