Create cluster
- Print
- PDF
Create cluster
- Print
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
Available in VPC
Create a new cluster based on the entered information.
Request
The following describes the request format for the endpoint. The request format is as follows:
Method | URI |
---|---|
POST | /clusters |
Request headers
For headers common to all Ncloud Kubernetes Service APIs, see Ncloud Kubernetes Service common request headers.
Request syntax
The request syntax is as follows.
{
"name": "String",
"clusterType": "String",
"k8sVersion": "String",
"loginKeyName": "String",
"hypervisorCode": "String",
"regionCode": "String",
"zoneCode": "String",
"zoneNo": "Integer",
"publicNetwork": "Boolean",
"kubeNetworkPlugin": "String",
"vpcNo": "Integer",
"subnetNoList": [
"Integer"
],
"subnetLbNo": "Integer",
"lbPrivateSubnetNo": "Integer",
"lbPublicSubnetNo": "Integer",
"log": {
"audit": "Boolean"
},
"kmsKeyTag": "String",
"nodePool": [
{
"name": "String",
"nodeCount": "Integer",
"subnetNo": "Integer",
"subnetNoList": [
"Integer"
],
"softwareCode": "String",
"productCode": "String",
"labels": [
{
"key": "String",
"value": "String"
}
],
"taints": [
{
"key": "String",
"value": "String",
"effect": "String"
}
],
"serverSpecCode": "String",
"storageSize": "Integer",
"serverRoleId": "String"
}
]
}
Request body
The following describes the request body.
Field | Type | Required | Description |
---|---|---|---|
name | String | Required | Cluster name
|
clusterType | String | Required | Cluster type |
k8sVersion | String | Optional | Kubernetes version
|
loginKeyName | String | Required | Authentication key name
|
hypervisorCode | String | Optional | Hypervisor type
|
regionCode | String | Required | Region code
|
zoneCode | String | Conditional | Zone code
|
zoneNo | String | Conditional | Zone number
|
publicNetwork | Boolean | Optional | Subnet network type
true : publicfalse : private |
vpcNo | Integer | Required | Number of VPC where the cluster will be placed in
|
subnetNoList[] | Array | Required | Subnet number list
|
subnetLbNo | Integer | Conditional | @deprecated Private subnet number dedicated to load balancer
|
lbPrivateSubnetNo | Integer | Conditional | Number of load balancer-only private subnet to apply to the cluster
|
lbPublicSubnetNo | Integer | Required | Number of load balancer-only public subnet to apply to the cluster
|
log | Object | Optional | |
log.audit | Boolean | Optional | Set audit log
|
kmsKeyTag | String | Optional | Key Management Service's key tag
|
nodePool[] | Array | Optional | List of NodePools to add |
nodePool[].name | String | Optional | NodePool name |
nodePool[].nodeCount | Integer | Optional | Number of nodes |
nodePool[].subnetNo | Integer | Optional | @deprecated Subnet number |
nodePool[].subnetNoList[] | Array | Optional | Subnet number
|
nodePool[].softwareCode | String | Optional | Server image code
|
nodePool[].productCode | String | Optional | Service code
|
nodePool[].labels[] | Array | Optional | Node label list |
nodePool[].labels[].key | String | Conditional | Label key
|
nodePool[].labels[].value | String | Conditional | Label value
|
nodePool[].taints[] | Array | Optional | List of taints |
nodePool[].taints[].key | String | Conditional | Taint key
|
nodePool[].taints[].value | String | Optional | Taint value
|
nodePool[].taints[].effect | String | Conditional | taint effect
|
nodePool[].serverSpecCode | String | Optional | Server type
|
nodePool[].storageSize | Integer | Optional | Storage size
|
nodePool[].serverRoleId | String | Optional | ID to assign roles to NodePool servers
|
Request example
The following is a sample request.
curl --location --request POST 'https://nks.apigw.ntruss.com/vnks/v2/clusters' \
--header 'x-ncp-apigw-timestamp: {Timestamp}' \
--header 'x-ncp-iam-access-key: {Sub Account Access Key}' \
--header 'x-ncp-apigw-signature-v2: {API Gateway Signature}' \
--header 'Content-Type: application/json'
--data '{
"name": "String",
"clusterType": "String",
"k8sVersion": "String",
"loginKeyName": "String",
"hypervisorCode": "String",
"regionCode": "String",
"zoneCode": "String",
"zoneNo": "Integer",
"publicNetwork": "Boolean",
"kubeNetworkPlugin": "String",
"vpcNo": "Integer",
"subnetNoList": [
"Integer"
],
"subnetLbNo": "Integer",
"lbPrivateSubnetNo": "Integer",
"lbPublicSubnetNo": "Integer",
"log": {
"audit": "Boolean"
},
"nodePool": [
{
"name": "String",
"nodeCount": "Integer",
"subnetNo": "Integer",
"subnetNoList": [
"Integer"
],
"softwareCode": "String",
"productCode": "String",
"labels": [
{
"key": "String",
"value": "String"
}
],
"taints": [
{
"key": "String",
"value": "String",
"effect": "String"
}
],
"serverSpecCode": "String",
"storageSize": "Integer",
"serverRoleId": "String"
}
]
}'
Response
The following describes the response format.
Response syntax
The response syntax is as follows.
{
"uuid": "String"
}
Response body
The following describes the response body.
Field | Type | Required | Description |
---|---|---|---|
uuid | String | - | UUID of the cluster |
Response status codes
For response status codes common to all Ncloud Kubernetes Service APIs, see Ncloud Kubernetes Service response status codes.
Response example
The following is a sample example.
{
"uuid": "****a20e-e0fb-4dc9-af1b-97fd3f8d****"
}
Was this article helpful?