Add Node Node (Existing Cloud Host) - AddUK8SExistingUHost
Overview
Add the pre-created cloud host to the UK8S cluster. Please note that this cloud host will still perform the system reinstallation operation.
Definition
Public Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
Action | string | Corresponding API command name, the current API is AddUK8SExistingUHost . | Yes |
PublicKey | string | The user’s public key can be obtained from Console | Yes |
Signature | string | User signature generated based on public key and API command, see Signature Algorithm | Yes |
Request Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
Region | string | Region. See List of Regions and Availability Zones | Yes |
Zone | string | Availability Zone. See Availability Zone List | No |
ProjectId | string | Project ID. If not filled in, the default project is used, and the sub-account must be filled in. Please refer to the GetProjectList interface. | No |
Password | string | Node node password. Please set the password according to the field specification. The password needs to be encoded with base64, as follows: # echo -n Password1 | base64 | Yes |
ClusterId | string | UK8S Cluster ID. Can be obtained from the UK8S console. | Yes |
UHostId | string | Cloud Host Id, to ensure the normal operation of the node, the configuration of this host should not be less than 2C4G. | Yes |
MaxPods | int | Default is 110, it is recommended to be less than or equal to 110 in the production environment. | No |
Labels | string | Node labels. In the form of key=value, multiple groups are separated by ”,”, up to 5 groups. For example, env=pro,type=game | No |
SubnetId | string | The subnet Id to which this cloud host belongs. | No |
ImageId | string | Image Id, if not filled, the backend program will automatically select an available Image Id. It supports user-defined images, and user-defined images must be based on basic images. | No |
DisableSchedule | boolean | Indicates whether to temporarily disable the node after adding it. Enter “true” to disable, enter anything else or leave it blank to not disable. | No |
UserData | string | User-defined data. This field can be filled when the image supports the Cloud-init Feature. Note: 1. The total data size does not exceed 16K; 2. Use base64 encoding. | No |
InitScript | string | User-defined Shell script. The difference from UserData is that InitScript is executed after the node initialization is completed, while UserData is executed during the initialization of the cloud host. | No |
Response Field
Field Name | Type | Description Information | Required |
---|---|---|---|
RetCode | int | Return status code. If it is 0, it means successful return. If it is not 0, it means failure. | Yes |
Action | string | Operation command name. | Yes |
Message | string | Returns an error message, providing detailed description when RetCode is non-zero. | No |
Example
Request Example
https://api.dezai.com/?Action=AddUK8SExistingUHost
&Region=cn-zj
&Zone=cn-zj-01
&ProjectId=dVbiuuWn
&NodeId=UMOVYunk
&Password=yFgKqXEO
&MaxPods=1
&Labels=Zejwkpch
&ClusterId=KOyqQlVA
&ClusterId=JrBEhuxq
&SubnetId=DCsCsHkw
&ImageId=elKgKSHF
&DisableSchedule=dAOelOGX
&UserData=eqDmkTAX
&InitScript=PhwUTXgX
Response Example
{
"Action": "AddUK8SExistingUHostResponse",
"Message": "kCwOaEDG",
"RetCode": 0
}