Managing Nodes
Function
MEF Center can add nodes in a Kubernetes cluster to the database, resulting in these nodes becoming unmanaged. You can use the API for querying unmanaged nodes to obtain the IDs of these nodes. And then use the ID-related parameter to add unmanaged nodes to MEF Center to have them managed.
Syntax
Operation type: POST
URL: https://{ip}:{port}/edgemanager/v1/node/add
Request message body:
{
"name": NodeName,
"descrption": NodeDescription,
"groupIDs": [GroupId],
"nodeID": NodeId
}
Request Parameters
Parameter |
Mandatory/Optional |
Description |
Value |
|---|---|---|---|
name |
Mandatory |
Node name |
The value is a string of 1 to 64 characters, including uppercase letters, lowercase letters, digits, hyphens (-), and underscores (_). It cannot start or end with an underscore (_) or hyphen (-). |
description |
Optional |
Node description |
The value is a string of 0 to 512 characters, including non-whitespace characters and spaces. |
groupIDs |
Optional |
ID array of the node group to which a node is added |
32-bit unsigned numeric array. The maximum number of elements in an array is 10. The minimum value is 1 and the maximum value is 2^32-1. |
nodeID |
Mandatory |
Node ID |
32-bit unsigned number. The minimum value is 1 and the maximum value is 2^32-1. |
Usage Example
Request:
POST https://10.10.10.10:30035/edgemanager/v1/node/add
Request message body:
{
"name": "node-1",
"description": "node_1_description",
"groupIDs": [1,2],
"nodeID": 1
}
Response:
{
"status": "00000000",
"msg": "success"
}
Response status code: 200
Output Description
Parameter |
Type |
Description |
|---|---|---|
status |
String |
Error code |
msg |
String |
Description |
data |
Object |
Batch operation result. If all batch operations are successful, this parameter is not returned. |
Parameter |
Type |
Description |
|---|---|---|
successIDs |
Array |
ID of the node group that is successfully added |
failedInfos |
Hash table. The key and value are character strings. |
key is the ID of the node group that fails to be added, and value is the failure cause. |