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.
Query string parameters
search string or integer
optional
Search for the name or ID of the cluster to retrieve it.
environment string or integer
optional
Retrieve a list of clusters deployed in a specific environment by specifying the environment’s name or ID.
page integer
optional
The page number to retrieve clusters from.
pageSize integer
optional
Specify the number of clusters to return per page.
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.
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.
{
"status": true,
"message": "Getting clusters success",
"clusters": [
{
"id": 339,
"name": "example-cluster",
"environment_name": "CANADA-1",
"kubernetes_version": "1.27.8",
"api_address": "https://api.example-50-xyz123.canada.hyperstackcustomers.cloud: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.