Skip to main content

List Kubernetes Clusters

GET https://infrahub-api.nexgencloud.com/v1/core/clusters

Retrieve a list of your current clusters, providing detailed information for each, including cluster ID, operational status, environment, flavor (hardware configuration), and more.


Parameters


No parameters.


Attributes


status boolean

Indicates the result of the request to list clusters. true signifies success, while false indicates an error.


message string

A description of the status of the request.


clusters array of objects

An array of objects containing details about your clusters.

For descriptions of the fields within the clusters objects returned in response to your request, please refer to the documentation here.

Example request
curl -X GET "https://infrahub-api.nexgencloud.com/v1/core/clusters" \
-H "accept: application/json"\
-H "api_key: YOUR API KEY"
  • To authenticate Infrahub API requests, add an api_key header to your API request that contains an API Key.
Response
{
"status": true,
"message": "Getting clusters success",
"clusters": [
{
"id": 339,
"name": "example-cluster",
"environment_name": "CANADA-1",
"kubernetes_version": "1.27.8",
"api_address": "https://38.128.232.211:6443",
"kube_config": "...",
"status": "CREATE_COMPLETE",
"status_reason": "K8s is ready",
"node_count": 2,
"master_flavor": {
"id": 106,
"name": "n1-cpu-large",
"cpu": 16,
"ram": 16.0,
"disk": 200,
"ephemeral": 0,
"gpu": "",
"gpu_count": 0,
"labels": [],
"features": {
"network_optimised": false,
"no_hibernation": false,
"no_snapshot": false,
"local_storage_only": false
}
},
"node_flavor": {
"id": 100,
"name": "n3-A100x1",
"cpu": 28,
"ram": 120.0,
"disk": 100,
"ephemeral": 750,
"gpu": "A100-80G-PCIe",
"gpu_count": 1,
"labels": [],
"features": {
"network_optimised": false,
"no_hibernation": false,
"no_snapshot": false,
"local_storage_only": false
}
},
"keypair_name": "example-key",
"enable_public_ip": true,
"created_at": "2025-02-14T15:39:09"
}
]
}

Returns


Returns the status of request and the clusters objects containing the details of your clusters.


Back to top