Create Kubernetes Cluster Nodes
POST https://infrahub-api.nexgencloud.com/v1/core/clusters/{id}/nodes
Creates one or more nodes and adds them to an existing Kubernetes cluster. Specify the Kubernetes cluster ID in the path and include the node count
and role
in the request body. Currently, only worker nodes can be added dynamically to a cluster.
Body parameters
role string
Required
The type of node being added to the Kubernetes cluster. Currently, only worker nodes can be added dynamically using the worker
role. To learn more about Hyperstack node roles, click here.
Possible values:
worker
– Nodes for processing workloads.master
– Manages cluster state, scheduling, and workloads.bastion
– Provides a secure SSH gateway for cluster access.load-balancer
– Distributes traffic across worker nodes for high availability.
count integer
Required
The number of nodes to be added to the Kubernetes cluster. Must be between 1 and 20.
Attributes
status boolean
Indicates the result of the request to create a node. true
signifies success, while false
indicates an error.
message string
A description of the status of the request.
Example request
curl -X POST "https://infrahub-api.nexgencloud.com/v1/core/clusters/{id}/nodes" \
-H "accept: application/json"\
-H "api_key: YOUR API KEY"\
-H "content-type: application/json" \
-d '{
"role": "worker",
"count": 1
}'
- To authenticate Infrahub API requests, add an
api_key
header to your API request that contains an API Key.
Response
{
"status": true,
"message": "string"
}
Returns
Returns the status of node deployment