Retrieve Kubernetes Cluster Details
GET https://infrahub-api.nexgencloud.com/v1/core/clusters/{id}
Retrieves the details of a Kubernetes cluster. Supply the cluster ID in the path, and the API will return the corresponding cluster object.
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 contains details including configuration and specification 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"
{
"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://38.128.232.211: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 instance
object containing the details of the specified cluster. If details on the specified cluster are not retrieved, an error will be returned.