Retrieve Kubernetes Cluster Details
GET https://infrahub-api.nexgencloud.com/v1/core/clusters/{id}
Retrieves detailed information about a Kubernetes cluster, including its name, environment, configuration, and operational status. Provide the cluster ID in the path to fetch its details. To obtain the cluster ID, use the List Clusters API.
Path parameters
id integer
Required
The unique identifier of the cluster for which to retrieve details.
Attributes
status boolean
Indicates the result of the request to retrieve cluster details. true
signifies success, while false
indicates an encountered error.
message string
A description of the status of the request.
cluster object
The cluster
object includes configuration, specifications, and other relevant details about the cluster.
For descriptions of the fields within the cluster
object returned in response to your request, please refer to the documentation here.
curl -X GET "https://infrahub-api.nexgencloud.com/v1/core/clusters/{id}" \
-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 cluster detail success",
"cluster": {
"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": null,
"status": "CREATING",
"status_reason": "Loadbalancer 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 cluster
object containing the details of the specified cluster. If details on the specified cluster are not retrieved, an error will be returned.