Skip to main content

Retrieve Kubernetes Cluster Nodes

GET https://infrahub-api.nexgencloud.com/v1/core/clusters/{id}/nodes

Retrieves detailed information about the nodes of a specified Kuberenetes cluster.


Path parameters


id integer   Required

The unique identifier of the cluster for which to retrieve node 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.


nodes array of objects

The nodes array of objects includes details on each of the nodes within the cluster, including the ID, node type, current status, timestamps, and more.

For descriptions of the fields within the nodes objects, please refer to the documentation here.

Example request
curl -X GET "https://infrahub-api.nexgencloud.com/v1/core/clusters/{id}/nodes" \
-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": "Cluster nodes retrieved successfully",
"nodes": [
{
"id": 1380,
"instance_id": 7441,
"instance_name": "kube-example-cluster-bastion-0",
"role": "bastion",
"status": "CREATING",
"status_reason": "VM is creating",
"is_bastion": true,
"requires_public_ip": true,
"created_at": "2025-02-27T13:10:35",
"updated_at": "2025-02-27T13:15:20"
},
{
"id": 1381,
"instance_id": 7442,
"instance_name": "kube-example-cluster-load-balancer-0",
"role": "load-balancer",
"status": "CREATING",
"status_reason": "VM is creating",
"is_bastion": false,
"requires_public_ip": true,
"created_at": "2025-02-27T13:10:35",
"updated_at": "2025-02-27T13:15:21"
},
{
"id": 1382,
"instance_id": 7443,
"instance_name": "kube-example-cluster-master-0",
"role": "master",
"status": "CREATING",
"status_reason": "VM is creating",
"is_bastion": false,
"requires_public_ip": false,
"created_at": "2025-02-27T13:10:35",
"updated_at": "2025-02-27T13:15:23"
},
{
"id": 1383,
"instance_id": 7444,
"instance_name": "kube-example-cluster-worker-0",
"role": "worker",
"status": "CREATING",
"status_reason": "VM is creating",
"is_bastion": false,
"requires_public_ip": false,
"created_at": "2025-02-27T13:10:35",
"updated_at": "2025-02-27T13:10:35"
}
]
}

Returns


Returns an array of nodes objects containing details for each node within the cluster. If details on the nodes within the specified cluster are not retrieved, an error will be returned.


Back to top