Docs
api
UK8S Service(UK8S)
CreateUK8SClusterV2

Create UK8S Cluster V2 - CreateUK8SClusterV2

Overview

Create UK8S Cluster

Definition

Public Parameters

Parameter NameTypeDescription InformationRequired
ActionstringCorresponding API command name, the current API is CreateUK8SClusterV2.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
ProjectIdstringProject ID. Please refer to the GetProjectList interfaceYes
VPCIdstringCluster Node and Pod’s VPCYes
SubnetIdstringSubnet of Cluster Node and PodYes
ServiceCIDRstringService subnet, used for assigning ClusterIP, such as 172.17.0.0/16. This subnet cannot overlap with the VPC subnet to which the cluster belongs.Yes
ClusterNamestringCluster NameYes
PasswordstringCluster node password, including Master and Node. The password must contain at least one uppercase letter, please use base64 for encoding, as shown in the following example: # echo -n Password1 | base64Yes
Master.N.ZonestringThe availability zone of the Master node needs to be set, including Master.0.Zone, Master.1.Zone, and Master.2.Zone for the three Master nodes. The three nodes can be deployed in different availability zones. See Availability Zone ListYes
MasterMachineTypestringCloud host machine type of the Master node (V2.0), such as [“N”, “C”, “O”, “OS”], please refer to the cloud host machine type for specifics.Yes
MasterCPUintThe number of virtual CPU cores for the Master node. Optional parameters: 2-64 (refer to the console for the specific relationship between the machine type and CPU).Yes
MasterMemintThe size of the memory for the Master node. Unit: MB. Range: [4096, 262144], must be a multiple of 1024 (optional range refers to the console).Yes
Nodes.N.ZonestringA set of Nodes belong to the available zone, multiple sets of Nodes can be created, such as one set is CPU Nodes, and another set is GPU Nodes. See Available Zone List.Yes
Nodes.N.MachineTypestringA set of Nodes host types, such as [“N”, “C”, “O”, “OS”], please refer to the UHost types for specifics.Yes
Nodes.N.CPUintThe number of virtual CPU cores for a group of Node nodes. Unit: cores, Range: [2, 64], optional range refers to the console.Yes
Nodes.N.MemintThe memory size of a group of Node nodes. Unit: MB, range: [4096, 262144], must be a multiple of 1024, optional range can be referred to the console.Yes
Nodes.N.CountintThe number of a group of Node nodes, range: [1,10].Yes
Nodes.N.IsolationGroupstringThe isolation group ID of a set of Node nodes. Virtual machine nodes belonging to the same isolation group will fall on different physical machines. A single isolation group can accommodate up to 8 nodes. See DescribeIsolationGroup.No
Nodes.N.MaxPodsintThe maximum number of nodes that can run on a Node, default is 110.No
Nodes.N.LabelsstringNode labels in the form of key=value, multiple labels are separated by commas, and up to five groups are supported.No
Nodes.N.BootDiskTypestringSystem disk type for a group of Node nodes, please refer to Disk Type. The default is SSD cloud disk.No
Nodes.N.BootDiskSIzeintThe system disk size of the Node node, in GB, defaults to 40. Range: [40, 500]. Note that the SSD local disk cannot be adjusted.No
Nodes.N.DataDiskTypestringThe data disk type of a set of Node nodes, please refer to Disk Type. The default is SSD cloud disk.No
Nodes.N.GpuTypestringThe GPU type of a group of Node nodes, enumeration values [“K80”, “P40”, “V100”], refer to the Console for the latest values.No
Nodes.N.GPUintThe number of GPU cores in a group of Node nodes, only GPU models support this field.No
Nodes.N.DataDiskSizeintData disk size, in GB. Default is 0. Range: [20, 1000]No
Nodes.N.MinimalCpuPlatformstringThe minimum CPU platform for the Node node, if not selected, it will be random. Enumeration values [“Intel/Auto”, “Intel/IvyBridge”, “Intel/Haswell”, “Intel/Broadwell”, “Intel/Skylake”, “Intel/Cascadelake”].No
Nodes.N.TaintsstringNode taints, in the form of key=value:effect, multiple taints are separated by ”,”, up to five groups are supported.No
MasterBootDiskTypestringMaster node system disk type. Please refer to Disk Type. The default is SSD cloud disk.No
MasterBootDiskSizeintThe size of the Master node system disk, in GB, defaults to 40. Range: [40, 500]. Note that SSD local disks cannot be adjusted.No
MasterDataDiskTypestringType of data disk for the Master node. Please refer to Disk Type. The default is SSD cloud disk.No
MasterDataDiskSizeintThe size of the data disk on the Master node, in GB, defaults to 0. Range: [20, 1000]No
ChargeTypestringThe payment mode for all nodes in the cluster. Enumerated values are: Yearly, pay annually; Monthly, pay monthly; Dynamic, pay hourly (permission required), default is monthly.No
K8sVersionstringThe version of the k8s cluster, please refer to the UK8S cluster creation page for version information. If not specified, the default is the highest version currently supported.No
QuantityintPurchase duration. The default is 1. This parameter is not required when purchasing by the hour (Dynamic). When paying monthly, this parameter is passed as 0, representing a purchase until the end of the month.No
ExternalApiServerstringWhether to allow external network access to apiserver, enabled: Yes, not enabled: No. The default is No.No
MasterIsolationGroupstring[Invalid, Deleted] The system will automatically create an isolation group for the Master node to ensure that the Master node belongs to different physical machines.No
KubeProxy.ModestringCluster kube-proxy mode. Supports iptables and ipvs, default is iptables.No
ImageIdstringThe image ID of the Master node and Node node. If not filled in, a random available base image will be selected. User-defined images are supported.No
UserDatastringUser-defined data. Note: 1, The total data size does not exceed 16K; 2, Use base64 encoding.No
InitScriptstringUser-defined scripts, different from UserData, will be executed after the cluster installation is completed.
Note: 1. The total data size does not exceed 16K; 2. Use base64 encoding.
No
MasterMinimalCpuPlatformstringThe minimum CPU platform for the Master node, random if not selected. Enumerated values [“Intel/Auto”, “Intel/IvyBridge”, “Intel/Haswell”, “Intel/Broadwell”, “Intel/Skylake”, “Intel/Cascadelake”.""".No
ClusterDomainstringDefine clusterdomain when creating a clusterNo
TagstringBusiness GroupNo

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
ClusterIdstringCluster IDYes

Example

Request Example

https://api.dezai.com/?Action=CreateUK8SClusterV2
&Region=cn-zj
&Zone=cn-zj-01
&ProjectId=DUYLbuwj
&VPCId=NIUbMRrP
&SubnetId=oWAtQljO
&ServiceCIDR=iXXMZpXs
&ClusterName=gcuwXSLm
&Password=vDsbRNNQ
&ChargeType=TrFaoDAK
&Quantity=PxBiAWAo
&K8sVersion=uxAueotm
&ExternalApiServer=vasrSAjn
&Master.1.zone=rwFzpSWL
&Master.2.zone=MuzxrYho
&Master.3.zone=blItdpQD
&MasterMachineType=rBCZRPYI
&MasterMinmalCpuPlatform=wJoUcbYp
&MasterCPU=oKqzqZZh
&MasterMem=hwUjKpoK
&MasterBootDiskType=jbQIKkul
&MasterDataDiskType=RmHtwyLG
&MasterDataDiskSize=NFuIPJcm
&Nodes.N.zone=hDtZnELL
&Nodes.N.MachineType=MMuaNZIl
&Nodes.N.MinmalCpuPlatform=uLWsDWDL
&Nodes.N.GpuType=mXrWwOLD
&Nodes.N.GPU=nRsbGDlh
&Nodes.N.CPU=CiNwWCeJ
&Nodes.N.Mem=ZgEuxdnu
&Nodes.N.BootDiskType=VQGewTRm
&K8sVersion=UOoiKtNm
&ExternalApiServer=RVgMWokk
&Master.1.zone=wXjbFYSU
&Master.2.zone=YvijQPFd
&Master.3.zone=CAIJnJEp
&MasterMachineType=SiECGsDX
&MasterMinmalCpuPlatform=kElumqZJ
&MasterCPU=ODBnDKWv
&MasterMem=IQKJEydV
&MasterBootDiskType=rqEFOgqz
&MasterDataDiskType=qCJOPxEF
&MasterDataDiskSize=tkpcQGJS
&Nodes.N.zone=aLzNslLv
&Nodes.N.MachineType=hCtXDpwx
&Nodes.N.MinmalCpuPlatform=hhfNYZAU
&Nodes.N.GpuType=lEgwfaMY
&Nodes.N.GPU=pXervTpu
&Nodes.N.CPU=TqeQgstN
&Nodes.N.Mem=AhdyTtIB
&Nodes.N.BootDiskType=ePIgbSGU
&Nodes.N.DataDiskType=jLNDJqhX
&Nodes.N.DataDiskSize=2
&Nodes.N.Counts=6
&Nodes.N.DataDiskType=OlCnwgED
&Nodes.N.DataDiskSize=1
&Nodes.N.Count=4
&Nodes.N.IsolationGroup=lRBbaDzS
&Nodes.N.MaxPods=3
&Nodes.N.Labels=CqzkeSQm
&MasterIsolationGroup=dDOFtdaB
&KubeProxy.Mode=GIDxitAX
&Master.1.ImageId=ABQAxkZu
&Master.2.ImageId=fkxnCKWb
&Master.0.ImageId=uUDUNHsr
&Nodes.0.ImageId=awZnTxun
&Master.1.ImageId=iYqiafUe
&Master.2.ImageId=LkAIwJWg
&Master.0.ImageId=pakiLuEz
&Nodes.N.ImageId=BcMswTGF
&UserData=owngUkKm
&InitScript=SbzevruM
&ClusterDomain=ttXFgIDH
&Nodes.N.Taints=aoCdpgSC
&Tag=PCyjOmac
&MasterBootDiskSize=7
&Nodes.N.BootDiskSIze=9

Response Example

{
  "Action": "CreateUK8SClusterV2Response",
  "ClusterId": "cFlgBOGW",
  "RetCode": 0
}