Create UK8S Cluster V2 - CreateUK8SClusterV2
Overview
Create UK8S Cluster
Definition
Public Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
Action | string | Corresponding API command name, the current API is CreateUK8SClusterV2 . | Yes |
PublicKey | string | The user's public key can be obtained from Console (opens in a new tab) | 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 |
ProjectId | string | Project ID. Please refer to the GetProjectList interface | Yes |
VPCId | string | Cluster Node and Pod's VPC | Yes |
SubnetId | string | Subnet of Cluster Node and Pod | Yes |
ServiceCIDR | string | Service 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 |
ClusterName | string | Cluster Name | Yes |
Password | string | Cluster 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 | base64 | Yes |
Master.N.Zone | string | The 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 List | Yes |
MasterMachineType | string | Cloud 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 |
MasterCPU | int | The 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 |
MasterMem | int | The 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.Zone | string | A 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.MachineType | string | A set of Nodes host types, such as ["N", "C", "O", "OS"], please refer to the UHost types for specifics. | Yes |
Nodes.N.CPU | int | The 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.Mem | int | The 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.Count | int | The number of a group of Node nodes, range: [1,10]. | Yes |
Nodes.N.IsolationGroup | string | The 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.MaxPods | int | The maximum number of nodes that can run on a Node, default is 110. | No |
Nodes.N.Labels | string | Node labels in the form of key=value, multiple labels are separated by commas, and up to five groups are supported. | No |
Nodes.N.BootDiskType | string | System disk type for a group of Node nodes, please refer to Disk Type. The default is SSD cloud disk. | No |
Nodes.N.BootDiskSIze | int | The 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.DataDiskType | string | The data disk type of a set of Node nodes, please refer to Disk Type. The default is SSD cloud disk. | No |
Nodes.N.GpuType | string | The GPU type of a group of Node nodes, enumeration values ["K80", "P40", "V100"], refer to the Console for the latest values. | No |
Nodes.N.GPU | int | The number of GPU cores in a group of Node nodes, only GPU models support this field. | No |
Nodes.N.DataDiskSize | int | Data disk size, in GB. Default is 0. Range: [20, 1000] | No |
Nodes.N.MinimalCpuPlatform | string | The 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.Taints | string | Node taints, in the form of key=value:effect, multiple taints are separated by ",", up to five groups are supported. | No |
MasterBootDiskType | string | Master node system disk type. Please refer to Disk Type. The default is SSD cloud disk. | No |
MasterBootDiskSize | int | The size of the Master node system disk, in GB, defaults to 40. Range: [40, 500]. Note that SSD local disks cannot be adjusted. | No |
MasterDataDiskType | string | Type of data disk for the Master node. Please refer to Disk Type. The default is SSD cloud disk. | No |
MasterDataDiskSize | int | The size of the data disk on the Master node, in GB, defaults to 0. Range: [20, 1000] | No |
ChargeType | string | The 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 |
K8sVersion | string | The 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 |
Quantity | int | Purchase 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 |
ExternalApiServer | string | Whether to allow external network access to apiserver, enabled: Yes, not enabled: No. The default is No. | No |
MasterIsolationGroup | string | [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.Mode | string | Cluster kube-proxy mode. Supports iptables and ipvs, default is iptables. | No |
ImageId | string | The 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 |
UserData | string | User-defined data. Note: 1, The total data size does not exceed 16K; 2, Use base64 encoding. | No |
InitScript | string | User-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 |
MasterMinimalCpuPlatform | string | The 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 |
ClusterDomain | string | Define clusterdomain when creating a cluster | No |
Tag | string | Business Group | 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 |
ClusterId | string | Cluster ID | Yes |
Example
Request Example
https://api.surfercloud.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
}