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 | 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 |
SecGroupId.N.Id | string | Security Group ID. Up to 5 security groups can be bound at the same time. | No |
SecGroupId.N.Priority | string | Security Group Priority. Value range [1, 5] | No |
SecGroupId.N.Name | string | Security Group Name. | No |
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 |
Nodes.N.SecurityMode | string | Host Security Mode. Firewall: Firewall; SecGroup: Security Group; Default Value: Firewall. | No |
Nodes.N.NamePrefix | string | The custom node name prefix of a set of Node nodes. The full custom node name should be {NamePrefix}-{NodeIP}. | No |
Nodes.N.ImageId | string | The image ID of the Node, if not filled, the ImageId parameter will be used. User-defined images are supported. | No |
Nodes.N.UNIFeature | string | Enable UNI feature. This feature is effective only when the UNI permission bit is enabled. By default, it is set to false (disabled), true (enabled). | No |
NetworkInterface.N.EIP.Bandwidth | int | [If EIP is bound, this parameter is required] The bandwidth of the Elastic IP in the public network, in Mbps. Shared bandwidth mode must specify 0M bandwidth, non-shared bandwidth mode must specify non-0Mbps bandwidth. The bandwidth range of non-shared bandwidth in various regions is as follows: Traffic billing [1-300], Bandwidth billing [1-800] | No |
NetworkInterface.N.EIP.PayMode | string | Billing mode of Elastic IP. Enumerated values: “Traffic”, traffic billing; “Bandwidth”, bandwidth billing; “ShareBandwidth”, shared bandwidth mode. “Free”: Free bandwidth mode, default is “Bandwidth”. | No |
NetworkInterface.N.EIP.ShareBandwidthId | string | The ID of the bound shared bandwidth, effective only when PayMode is set to ShareBandwidth. | No |
NetworkInterface.N.EIP.OperatorName | string | [If EIP is bound, this parameter is required] The line of the Elastic IP. Enumeration value: International: International BGP: Bgp. The line parameters allowed in each region are as follows: cn-sh1: Bgp cn-sh2: Bgp cn-gd: Bgp cn-bj1: Bgp cn-bj2: Bgp hk: International us-ca: International th-bkk: International kr-seoul: International us-ws: International ge-fra: International sg: International tw-kh: International. All other overseas lines are International | No |
NetworkInterface.N.EIP.CouponId | string | The current EIP coupon id. Please query through the DescribeCoupon interface, or log in to the user center to view. | No |
Nodes.N.SecurityGroupId | string | Firewall ID, default: Web recommended firewall. For how to query SecurityGroupId, please refer to DescribeFirewall. | No |
SecGroupId.N.Id | string | Security Group ID. Up to 5 security groups can be bound at the same time. | No |
SecGroupId.N.Priority | string | Security Group Priority. Value range [1, 5] | No |
SecGroupId.N.Name | string | Security Group Name. | 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 |
MasterImageId | string | The image ID of the Master node. If not specified, the ImageId parameter will be used. Supports user-defined images. | No |
LbClass | string | Master lb type default ulb, optional ulb nlb | No |
ForwardSrcIPMethod | string | The source IP forwarding mode supported when LbClass is nlb, currently only supports Toa. If it is empty, the IP function enumeration is not open source: "", Toa | No |
UserLabels | string | UK8S user tags, in key=value format, multiple groups separated by ”,”, with a maximum of 5 groups. For example: env=pro,type=game | 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.zosoc.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
&CNIMode=HQAhnibp
&PodCIDR=LkIFfqBU
&IPBlockSize=yPTYRITN
&CrossSubnetOverlay=ykfkUtYe
&DedicatedPodSubnet=true
&PodSubnetId=AtLKBDZC
&PodSubnetSecGroup=voVhGwAs
&Nodes.N.UNIFeature=tcXYRfSf
&MasterImageId=KRCMIYAZ
&Nodes.N.ImageId=mIwEOFSN
&LbClass=XgLGNVvn
&ForwardSrcIPMethod=jMmCcbym
&Nodes.N.NamePrefix=JjocQScJ
&Nodes.N.NamePrefix=zEOlQeni
&Master.N.SecGroupId.N.Id=IcmLJdGu
&Master.N.SecGroupId.N.Priority=cfpFfBav
&Master.N.SecGroupId.N.Name=UaqXcFZZ
&Nodes.N.NetworkInterface.N.EIP.Bandwidth=EZnVoNAw
&Nodes.N.NetworkInterface.N.EIP.PayMode=gwQwKZlT
&Nodes.N.NetworkInterface.N.EIP.ShareBandwidthId=paDAphwE
&Nodes.N.NetworkInterface.N.EIP.OperatorName=SJMUIxis
&Nodes.N.NetworkInterface.N.EIP.CouponId=tHvQXoED
&Nodes.N.SecurityMode=uUgueXIj
&Nodes.N.SecurityGroupId=QHcmcRAP
&Nodes.N.SecGroupId.N.Id=WOkeFmEP
&Nodes.N.SecGroupId.N.Priority=gpPFbYmv
&Nodes.N.SecGroupId.N.Name=paIynhHT
&UserLabels=vJsZlNcH
Response Example
{
"Action": "CreateUK8SClusterV2Response",
"ClusterId": "cFlgBOGW",
"RetCode": 0
}