Skip to main content
A newer release of this product is available.

Cluster nodes endpoint overview

Contributors

Overview

This API is used to add nodes to a cluster, update node-specific configurations, and retrieve the current node configuration details.

Adding a node to a cluster

A node can be added to a cluster by issuing a POST /cluster/nodes request to a node currently in the cluster. All nodes must be at the same version to use this API. Mixed version joins are not supported in this release. Properties can be provided as fields in the body of the POST request to configure node-specific settings. On a successful request, POST /cluster/nodes returns a status code of 202 and job information in the body. The /cluster/jobs APIs can be used to track the status of the node add job.

Fields used for adding a node

Fields used for the /cluster/nodes APIs fall into the following categories

Required node fields

The following field is required for any POST /cluster/nodes request:

  • cluster_interface.ip.address

Optional fields

All of the following fields are used to setup additional cluster-wide configuration:

  • name

  • location

  • records

Network interface fields

Each node can have a node-specific configuration set in POST /cluster/nodes. If a field is provided in the body of a node, it must be provided for all nodes in the POST body. The node management interface can be provided for each node if all node management interfaces in the cluster use the same netmask. If the node management interfaces use different netmasks, then configuration of the node management interfaces should be done using the /network/ip/interfaces API.

The records field

Multiple nodes can be added to the cluster in one request by providing an array named "records" with multiple node entries. Each node entry in records must follow the required and optional fields listed previously. When only adding a single node, no records field is needed. See 'Example usecases' for an example of how to use the records field.

Modifying node configurations

The following fields can be used to modify a node configuration:

  • name

  • location

Examples

The following examples show how to shutdown/reboot a node and how to update a node configuration.

Adding a single node with a minimal configuration


# Body
body =
{
"cluster_interface": {
  "ip": {
    "address": "1.1.1.1"
  }
}
}

# Request
curl -X POST "https://<mgmt-ip>/api/cluster/nodes" -d body

Adding multiple nodes in the same request


# Body
body =
{
"records": [
    {
        "name": "node1",
        "cluster_interface": {
          "ip": {
            "address": "1.1.1.1"
          }
        }
    },
    {
        "name": "node2",
        "cluster_interface": {
          "ip": {
            "address": "2.2.2.2"
          }
        }
    },
]
}

# Request
curl -X POST "https://<mgmt-ip>/api/cluster/nodes" -d body

Modifying a cluster-wide configuration


# Body
body =
{
"name": "renamedNode",
"location": "newLocation"
}

# Request
curl -X PATCH "https://<mgmt-ip>/api/cluster/nodes" -d body

Shutting down a node


curl -X PATCH "https://<mgmt-ip>/api/cluster/nodes/{uuid}?action=shutdown"