Docs
api
UK8S Service(UK8S)
AddUK8SExistingUHost

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 NameTypeDescription InformationRequired
ActionstringCorresponding API command name, the current API is AddUK8SExistingUHost.Yes
PublicKeystringThe user’s public key can be obtained from ConsoleYes
SignaturestringUser signature generated based on public key and API command, see Signature AlgorithmYes

Request Parameters

Parameter NameTypeDescription InformationRequired
RegionstringRegion. See List of Regions and Availability ZonesYes
ZonestringAvailability Zone. See Availability Zone ListNo
ProjectIdstringProject 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
PasswordstringNode node password. Please set the password according to the field specification. The password needs to be encoded with base64, as follows: # echo -n Password1 | base64Yes
ClusterIdstringUK8S Cluster ID. Can be obtained from the UK8S console.
Yes
UHostIdstringCloud Host Id, to ensure the normal operation of the node, the configuration of this host should not be less than 2C4G.Yes
MaxPodsintDefault is 110, it is recommended to be less than or equal to 110 in the production environment.No
LabelsstringNode labels. In the form of key=value, multiple groups are separated by ”,”, up to 5 groups. For example, env=pro,type=gameNo
SubnetIdstringThe subnet Id to which this cloud host belongs.No
ImageIdstringImage 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
DisableSchedulebooleanIndicates whether to temporarily disable the node after adding it. Enter “true” to disable, enter anything else or leave it blank to not disable.No
UserDatastringUser-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
InitScriptstringUser-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 NameTypeDescription InformationRequired
RetCodeintReturn status code. If it is 0, it means successful return. If it is not 0, it means failure.Yes
ActionstringOperation command name.Yes
MessagestringReturns 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
}