Available in VPC
Create a new cluster based on the entered information.
Request
This section describes the request format. The method and URI are as follows:
| Method | URI |
|---|---|
| POST | /vnks/v2/clusters/clusters (Korea Region) |
| POST | /vnks/sgn-v2 (Singapore Region) |
| POST | /vnks/jpn-v2/clusters (Japan Region) |
Request headers
For information about the headers common to all Ncloud Kubernetes Service APIs, see Common Ncloud Kubernetes Service request headers.
Request body
You can include the following data in the body of your request:
| 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
|
isRegional |
Boolean | Optional | Whether the cluster is a multi-zone (regional) cluster
|
zoneCode |
String | Conditional | Zone code
|
zoneNo |
Integer | Conditional | Zone number
|
publicNetwork |
Boolean | Optional | Subnet network type
|
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 | Logs |
log.audit |
Boolean | Optional | Set audit log.
|
authType |
String | Optional | Cluster authentication method
|
bootstrapAccessEntry |
Boolean | Optional | Whether to automatically create a bootstrap access entry when creating a cluster
|
kmsKeyTag |
String | Optional | Key Management Service's key tag
|
nodePool |
Array | Optional | List of node pools to add: nodePool |
nodePool
The following describes nodePool.
| Field | Type | Required | Description |
|---|---|---|---|
name |
String | Optional | NodePool name |
nodeCount |
Integer | Optional | Number of nodes |
subnetNo |
Integer | Optional | @deprecated Subnet number |
subnetNoList[] |
Array | Optional | Subnet number
|
softwareCode |
String | Optional | Server image code
|
productCode |
String | Optional | Service code
|
labels[] |
Array | Optional | Node label list |
labels[].key |
String | Conditional | Label key
|
labels[].value |
String | Conditional | Label value
|
taints[] |
Array | Optional | List of taints |
taints[].key |
String | Conditional | Taint key
|
taints[].value |
String | Optional | Taint value
|
taints[].effect |
String | Conditional | taint effect
|
serverSpecCode |
String | Optional | Server type
|
storageSize |
Integer | Optional | Storage size
|
serverRoleId |
String | Optional | ID to assign roles to NodePool servers
|
zoneCode |
String | Conditional | Node pool's zone code
|
fabricCluster |
Object | Conditional | Fabric cluster information
|
fabricCluster.poolName |
String | Conditional | Fabric cluster pool information
|
fabricCluster.poolNo |
Integer | Conditional | Fabric cluster pool number
|
Request example
The request example is as follows:
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"
},
"isRegional": "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",
"zoneCode": "String"
}
]
}'
Response
This section describes the response format.
Response body
The response body includes the following data:
| Field | Type | Required | Description |
|---|---|---|---|
uuid |
String | - | UUID of the cluster |
Response status codes
For information about the HTTP status codes common to all Ncloud Kubernetes Service APIs, see Ncloud Kubernetes Service response status codes.
Response example
The response example is as follows:
{
"uuid": "****a20e-e0fb-4dc9-af1b-97fd3f8d****"
}