Download OpenAPI specification:Download
Authorization document available at https://docs.api.vngcloud.vn/#api-documentation
| id | string Default: "" Example: id=k8s-123 Search by cluster ID |
| name | string Default: "" Example: name=cluster-name Search by cluster name |
| page | integer <int32> >= 0 Default: 0 Example: page=0 Page number |
| pageSize | integer <int32> >= 1 Default: 10 Example: pageSize=10 Page size |
| status | string Default: "" Example: status=ACTIVE Search by status |
| version | string Default: "" Example: version=v1.19.0 Search by cluster version |
const request = require('request'); const options = { method: 'GET', url: 'https://vks.api.vngcloud.vn/v1/clusters', qs: { id: 'k8s-123', name: 'cluster-name', page: '0', pageSize: '10', status: 'ACTIVE', version: 'v1.19.0' }, headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'} }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); });
{- "items": [
- {
- "id": "k8s-2ff9b24c-a58c-497c-b526-79630b0d3c92",
- "name": "dev-cluster",
- "description": "Development environment cluster",
- "status": "ACTIVE",
- "releaseChannel": "STABLE",
- "version": "1.29.1",
- "numNodes": 5,
- "enablePrivateCluster": true,
- "createdAt": "2024-12-01T10:00:00.000Z",
- "updatedAt": "2025-01-05T16:30:00.000Z"
}
], - "total": 150,
- "page": 0,
- "pageSize": 10
}| autoRenewal | boolean Default: true Example: autoRenewal=true Enable auto renew |
| poc | boolean Default: false Example: poc=true Enable poc |
Create cluster body
| name required | string^[a-z0-9\-]{5,20}$ The name of the cluster. Only letters (a-z, 0-9, '-') are allowed. Your input data length must be between 5 and 20. |
| description | string^[a-zA-Z0-9-_. @]{0,255}$ Description of the cluster. Only letters (a-z, A-Z, 0-9, '@', '.' , '_' , '-' , ' '). Your input data length must be between 0 and 255. |
| releaseChannel required | object Default: "STABLE" Enum: "RAPID" "STABLE" Specifies release channel of Kubernetes that suits your demand between feature availability and stability. We provide 2 release channels: STABLE and RAPID. |
| version required | string [ 1 .. 50 ] characters Default: "v1.29.13-vks.1740045600" Specifies the version you wish to use for your Cluster. You can view all available Kubernetes versions here. The default value is "v1.29.13-vks.1740045600" |
| enablePrivateCluster required | boolean Default: false Enables the private cluster feature, creating a private endpoint on the cluster. The VKS public clusters refer to a type of Kubernetes cluster configuration where the Kubernetes API server endpoint is publicly accessible over the internet. In an VKS public cluster, the API server endpoint is not restricted to private access within a VPC (Virtual Private Cloud) and can be accessed over the public internet. The VKS private clusters are configured to have private access to the Kubernetes API server endpoint. This means that the API server endpoint is only accessible from within a specific Virtual Private Cloud (VPC) and is not exposed to the public internet. Private clusters provide enhanced security by restricting access to the Kubernetes API to resources within the VPC. At this time, the default value of this field is false and we only offer Public Cluster mode. The default value is "false". |
| networkType required | string^CALICO|CILIUM_OVERLAY|CILIUM_NATIVE_ROUTING$... Default: "CILIUM_OVERLAY" Enum: "CALICO" "CILIUM_OVERLAY" "CILIUM_NATIVE_ROUTING" The type of network for the cluster. The default value is CILIUM_OVERLAY. You can choose one in many options including CALICO, CILIUM_OVERLAY, CILIUM_NATIVE_ROUTING. If you choose CILIUM_NATIVE_ROUTING, you need to set the secondarySubnets and nodeNetmaskSize field. If you choose CALICO or CILIUM_OVERLAY, you need to set the cidr field. |
| vpcId required | string [ 1 .. 50 ] characters The VPC ID for the cluster. You need to create a VPC on vServer and enter the VPC's ID in this field. List all of your VPCs in here |
| subnetId required | string [ 1 .. 50 ] characters The subnet ID for the cluster. You need to create a Subnet on vServer and enter the Subnet's ID in this field. List all of your Subnets in here |
| cidr | string Specifies the CIDR block for the cluster using CALICO or CILIUM_OVERLAY network. You can enter a private IP CIDR from the following options: 10.0.0.0 - 10.255.0.0, 172.16.0.0 - 172.24.0.0, or 192.168.0.0. The default value is "172.16.0.0/16". |
| enabledLoadBalancerPlugin | boolean Default: true Enables/ Disable the attachment of load balancers (both network and application) via Kubernetes YAML. The default value is "true". |
| enabledBlockStoreCsiPlugin | boolean Default: true Enable/ Disable Automatically deploys and manages the BlockStore Persistent Disk CSI Driver via Kubernetes YAML. The default value is "true". |
| enabledServiceEndpoint | boolean Default: false Enables the creation and use of private service endpoints within your cluster. |
| secondarySubnets | Array of strings <= 10 items Specifies additional subnets to be useds in Cilium's VPC Native Routing mode (max 10). List all of your Secondary subnet in here |
| nodeNetmaskSize | integer <int32> [ 24 .. 26 ] Default: 25 Specifies the node CIDR mask size used in Cilium's VPC Native Routing mode. The default value is 25. You can enter a number from the following options: 24, 25, 26. |
object Cluster auto-upgrade configuration | |
object Fleet configuration for this cluster | |
required | object List of node groups to create in the cluster |
{- "name": "demo-cluster",
- "description": "Demo cluster for testing purposes",
- "releaseChannel": "STABLE",
- "version": "v1.29.13-vks.1740045600",
- "enablePrivateCluster": false,
- "networkType": "CALICO",
- "vpcId": "net-bf21c762-9b6f-45dc-9f1c-ac09158f3b3b",
- "subnetId": "sub-a3144389-b92c-453a-83b7-e165defe66d8",
- "cidr": "10.0.0.0/16",
- "enabledLoadBalancerPlugin": true,
- "enabledBlockStoreCsiPlugin": true,
- "enabledServiceEndpoint": false,
- "secondarySubnets": [
- "10.200.27.0/24",
- "10.200.28.0/24"
], - "nodeNetmaskSize": 24,
- "autoUpgradeConfig": {
- "weekdays": "Mon,Wed,Fri",
- "time": "03:00"
}, - "fleetConfig": {
- "fleetType": "NEW",
- "id": "flt-123",
- "name": "my-fleet-01",
- "enableNorthSouthTraffic": true,
- "enableEastWestTraffic": false
}, - "nodeGroups": {
- "name": "nodegroup-01",
- "numNodes": 3,
- "imageId": "img-db7784d2-4516-478e-939f-35a04ac50617",
- "flavorId": "flavor-7a7a8610-34f5-11ee-be56-0242ac120002",
- "diskSize": 100,
- "diskType": "vtype-7a7a8610-34f5-11ee-be56-0242ac120002",
- "enablePrivateNodes": true,
- "enabledEncryptionVolume": true,
- "securityGroups": [
- "secg-3b7c5f10-e417-4847-bf84-08d03365c61f",
- "secg-4b7c5f10-e417-4847-bf84-08d03365c61f"
], - "sshKeyId": "ssh-d4cf9811-5806-4289-ba15-54378663726b",
- "labels": {
- "vks.io/cluster-name": "vks-cluster-01",
- "vks.io/node-role": "worker"
}, - "taints": [
- {
- "key": "taint-key01",
- "value": "taint-value01",
- "effect": "NoSchedule"
}, - {
- "key": "taint-key02",
- "value": "taint-value02",
- "effect": "PreferNoSchedule"
}
], - "subnetId": "sub-3b7c5f10-e417-4847-bf84-08d03365c61f",
- "secondarySubnets": [
- "10.2.1.0/24",
- "10.2.2.0/24"
], - "autoScaleConfig": {
- "minSize": 1,
- "maxSize": 10
}, - "upgradeConfig": {
- "strategy": "SURGE",
- "maxSurge": 2,
- "maxUnavailable": 1
}, - "placementGroupConfigDto": {
- "type": "NEW",
- "placementGroupId": "server-group-06b86747-eaf7-47dd-9e41-579c2e30bfdd",
- "placementGroupName": "placement-group-vks-dev"
}
}
}{- "id": "k8s-2ff9b24c-a58c-497c-b526-79630b0d3c92",
- "name": "dev-cluster",
- "description": "Development environment cluster",
- "status": "ACTIVE",
- "releaseChannel": "STABLE",
- "version": "1.29.1",
- "numNodes": 5,
- "enablePrivateCluster": true,
- "createdAt": "2024-12-01T10:00:00.000Z",
- "updatedAt": "2025-01-05T16:30:00.000Z"
}| clusterId required | string ID of the cluster |
const request = require('request'); const options = { method: 'GET', url: 'https://vks.api.vngcloud.vn/v1/clusters/%7BclusterId%7D', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'} }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); });
{- "id": "k8s-2ff9b24c-a58c-497c-b526-79630b0d3c92",
- "name": "dev-cluster",
- "description": "Development environment cluster",
- "status": "ACTIVE",
- "releaseChannel": "STABLE",
- "version": "1.29.1",
- "numNodes": 5,
- "enablePrivateCluster": true,
- "createdAt": "2024-12-01T10:00:00.000Z",
- "updatedAt": "2025-01-05T16:30:00.000Z",
- "networkType": "CALICO",
- "vpcId": "vpc-12345",
- "subnetId": "subnet-67890",
- "secondarySubnets": [
- "subnet-a",
- "subnet-b"
], - "cidr": "10.0.0.0/16",
- "enabledLoadBalancerPlugin": true,
- "enabledBlockStoreCsiPlugin": false,
- "enabledServiceEndpoint": true,
- "whitelistNodeCIDRs": [
- "192.168.1.0/24"
], - "poc": false,
- "autoRenewal": true,
- "nodeNetmaskSize": 24,
- "serviceEndpoint": {
- "id": "epg-3f7defe7-9755-46d5-bbad-e2678ce9904c",
- "poc": false,
- "status": "ACTIVE",
- "createdAt": "2025-07-01T08:30:00.000Z"
}, - "location": "hn-vng",
- "autoUpgradeConfig": {
- "weekdays": "Mon,Wed,Fri",
- "time": "03:00",
- "futureTriggers": {
- "planStartAt": "2025-07-10T02:00:00.000Z",
- "planEndAt": "2025-07-10T03:00:00.000Z",
- "newVersion": "1.29.2"
}
}, - "fleet": {
- "id": "fleet-12345",
- "name": "production-fleet",
- "enableNorthSouthTraffic": true,
- "enableEastWestTraffic": false,
- "isHost": true,
- "host": true
}
}| clusterId required | string ID of the cluster |
Update node group body
| version required | string [ 1 .. 50 ] characters Specifies the version you wish to use for your Cluster. You can view all available Kubernetes versions here |
| whitelistNodeCIDRs required | Array of strings [ 1 .. 30 ] items List of CIDRs allowed to access cluster nodes |
| enabledLoadBalancerPlugin | boolean Default: true Enables/ Disable the attachment of load balancers (both network and application) via Kubernetes YAML. The default value is "true". |
| enabledBlockStoreCsiPlugin | boolean Default: true Enable/ Disable Automatically deploys and manages the BlockStore Persistent Disk CSI Driver via Kubernetes YAML. The default value is "true". |
{- "version": "v1.29.1",
- "whitelistNodeCIDRs": [
- "192.168.0.0/16",
- "10.0.0.0/8"
], - "enabledLoadBalancerPlugin": true,
- "enabledBlockStoreCsiPlugin": true
}{- "id": "k8s-2ff9b24c-a58c-497c-b526-79630b0d3c92",
- "name": "dev-cluster",
- "description": "Development environment cluster",
- "status": "ACTIVE",
- "releaseChannel": "STABLE",
- "version": "1.29.1",
- "numNodes": 5,
- "enablePrivateCluster": true,
- "createdAt": "2024-12-01T10:00:00.000Z",
- "updatedAt": "2025-01-05T16:30:00.000Z"
}| clusterId required | string ID of the cluster |
const request = require('request'); const options = { method: 'DELETE', url: 'https://vks.api.vngcloud.vn/v1/clusters/%7BclusterId%7D', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'} }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); });
{- "id": "k8s-2ff9b24c-a58c-497c-b526-79630b0d3c92",
- "name": "dev-cluster",
- "description": "Development environment cluster",
- "status": "ACTIVE",
- "releaseChannel": "STABLE",
- "version": "1.29.1",
- "numNodes": 5,
- "enablePrivateCluster": true,
- "createdAt": "2024-12-01T10:00:00.000Z",
- "updatedAt": "2025-01-05T16:30:00.000Z"
}| clusterId required | string ID of the cluster |
Cluster auto upgrade config body
| weekdays required | string Days of the week to perform auto upgrade, e.g. 'Mon,Wed,Fri' |
| time required | string Time of day to perform auto upgrade in 24h format HH:mm, e.g. '03:00' |
{- "weekdays": "Mon,Wed,Fri",
- "time": "03:00"
}{- "error": {
- "message": "Invalid request parameter"
}
}| clusterId required | string ID of the cluster |
const request = require('request'); const options = { method: 'DELETE', url: 'https://vks.api.vngcloud.vn/v1/clusters/%7BclusterId%7D/auto-upgrade-config', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'} }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); });
{- "error": {
- "message": "Invalid request parameter"
}
}| clusterId required | string ID of the cluster |
| action | string Default: "" Example: action=CreateServer Even action name |
| page | integer <int32> >= 0 Default: 0 Example: page=0 Page number |
| pageSize | integer <int32> >= 1 Default: 10 Example: pageSize=10 Page size |
| type | string Default: "" Example: type=Normal Event type |
const request = require('request'); const options = { method: 'GET', url: 'https://vks.api.vngcloud.vn/v1/clusters/%7BclusterId%7D/events', qs: {action: 'CreateServer', page: '0', pageSize: '10', type: 'Normal'}, headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'} }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); });
{- "items": [
- {
- "type": "NORMAL",
- "action": "CreateServer",
- "message": "Created a new server with name demo (ID: ins-99b1b6be-503a-4f9f-b755-5f8dff4c58d8).",
- "createdAt": "2025-07-04T09:30:00.000Z"
}
], - "total": 150,
- "page": 0,
- "pageSize": 10
}| clusterId required | string ID of the cluster |
const request = require('request'); const options = { method: 'GET', url: 'https://vks.api.vngcloud.vn/v1/clusters/%7BclusterId%7D/kubeconfig', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'} }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); });
{- "error": {
- "message": "Invalid request parameter"
}
}| clusterId required | string ID of the cluster |
Config fleet body
| fleetType required | object Enum: "NEW" "EXISTING" Type of the fleet |
| id | string Fleet ID |
| name | string^[a-z0-9\-]{5,20}$ Fleet name (5-20 lowercase alphanumeric or hyphens) |
| enableNorthSouthTraffic | boolean Enable North-South traffic routing |
| enableEastWestTraffic | boolean Enable East-West traffic routing |
{- "fleetType": "NEW",
- "id": "flt-123",
- "name": "my-fleet-01",
- "enableNorthSouthTraffic": true,
- "enableEastWestTraffic": false
}{- "error": {
- "message": "Invalid request parameter"
}
}| clusterId required | string ID of the cluster |
const request = require('request'); const options = { method: 'POST', url: 'https://vks.api.vngcloud.vn/v1/clusters/%7BclusterId%7D/stop-poc', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'} }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); });
{- "error": {
- "message": "Invalid request parameter"
}
}| clusterId required | string ID of the cluster |
const request = require('request'); const options = { method: 'PUT', url: 'https://vks.api.vngcloud.vn/v1/clusters/%7BclusterId%7D/unregister-fleet', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'} }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); });
{- "error": {
- "message": "Invalid request parameter"
}
}| clusterId required | string ID of the cluster |
| page | integer <int32> >= 0 Default: 0 Example: page=0 Page number |
| pageSize | integer <int32> >= 1 Default: 10 Example: pageSize=10 Page size |
const request = require('request'); const options = { method: 'GET', url: 'https://vks.api.vngcloud.vn/v1/clusters/%7BclusterId%7D/upgrade-insight', qs: {page: '0', pageSize: '10'}, headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'} }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); });
{- "items": [
- {
- "apiVersion": "apps/v1",
- "namespace": "default",
- "name": "my-deployment",
- "type": "Deployment",
- "recommendApiVersion": "apps/v1",
- "ruleSet": "kube-linter:v0.3",
- "resourceVersion": "1389765",
- "createdAt": "2025-06-01T12:34:56.000Z"
}
], - "total": 150,
- "page": 0,
- "pageSize": 10
}const request = require('request'); const options = { method: 'GET', url: 'https://vks.api.vngcloud.vn/v1/cluster-versions', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'} }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); });
[- {
- "version": "1.28.3",
- "enable": true,
- "stage": "STABLE",
- "deprecatedAt": "2025-12-01T00:00:00.000Z"
}
]| clusterId required | string ID of the cluster |
| page | integer <int32> >= 0 Default: 0 Example: page=0 Page number |
| pageSize | integer <int32> >= 1 Default: 10 Example: pageSize=10 Page size |
const request = require('request'); const options = { method: 'GET', url: 'https://vks.api.vngcloud.vn/v1/clusters/%7BclusterId%7D/node-groups', qs: {page: '0', pageSize: '10'}, headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'} }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); });
{- "items": [
- {
- "id": "ng-123",
- "clusterId": "cluster-123",
- "name": "my-node-group",
- "status": "CREATING",
- "numNodes": 3,
- "imageId": "image-123",
- "createdAt": "2023-10-01T12:00:00.000Z",
- "updatedAt": "2023-10-01T12:00:00.000Z"
}
], - "total": 150,
- "page": 0,
- "pageSize": 10
}| clusterId required | string ID of the cluster |
Node group body
| name required | string^[a-z0-9-]{5,15}$ The name of the node group. Only letters (a-z), numbers (0-9), and hyphens ('-') are allowed. The length of your input must be between 5 and 15 characters. |
| numNodes required | integer <int32> >= 0 Default: 3 The number of nodes to create in this cluster's node group. The number of nodes are between 1 and 10 nodes. If auto_scale_config is set, num_nodes need to be greater than or equal to Minimum node, and less than or equal to Maximum node. If auto_scale_config is not set, num_nodes need to be greater than or equal to 0, and less than or equal to 10. |
| imageId required | string [ 1 .. 50 ] characters [ 1 .. 50 ] Specifies the image you want to use for your node group. You can obtain the Image ID from the VKS Portal or from this link and enter it in this field. List all of our Image ID in here |
| flavorId required | string [ 1 .. 50 ] characters [ 1 .. 50 ] Specifies the flavor you want to use for your node in the node group. You can obtain the Flavor ID from this link and enter it in this field. List all of our Flavor ID in here |
| diskSize required | integer <int32> [ 20 .. 5000 ] Specifies the data disk size for new nodes in this node group. Must be between 20 GB and 1000 GB. The default value is "100". |
| diskType required | string [ 1 .. 50 ] characters [ 1 .. 50 ] Specifies the type of data disk for new nodes in this node group. Currently, SSD disks and NVME disks are available. List all of our disktypes in here |
| enablePrivateNodes required | boolean You can choose the mode that you want your node group works. The VKS public node groups include worker nodes deployed in public subnets within a VPC. These worker nodes have public IP addresses and CAN communicate directly with the public internet. The private node groups configuration involves deploying worker nodes within subnets of a VPC, ensuring they cannot directly access the public internet. All outbound traffic from these nodes is routed exclusively through a NAT gateway service. The default value is "false" |
| enabledEncryptionVolume | boolean Indicates whether volume encryption should be enabled for the node group. The default is false. |
| securityGroups required | Array of strings [ 1 .. 50 ] items Specifies the security group for your cluster. A security group acts as a virtual firewall, controlling inbound and outbound traffic for associated resources. You can find the Security Group ID on the vServer Portal and input it here. |
| sshKeyId required | string [ 1 .. 50 ] characters [ 1 .. 50 ] Specifies the SSH key for secure credentials to prove your identity when connecting to the server. You can import a key and get the SSH Key ID on the vServer Portal to input here. List all of your SSH Keys in here |
object Labels to be applied to the nodes in the node group. A maximum of 50 labels is allowed. Each label key must have two segments: an optional prefix and name, separated by a slash (/). The name segment is required and must be 63 characters or less, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between. The prefix is optional. If specified, the prefix must be a DNS subdomain: a series of DNS labels separated by dots (.), not longer than 253 characters in total, followed by a slash (/). | |
Array of objects (NodeGroupTaintDto) <= 50 items The Kubernetes taints to be applied to the nodes in the node group. Maximum 50 taints are allowed. | |
| subnetId | string [ 1 .. 50 ] characters [ 1 .. 50 ] Subnet ID to use for the Auto Scaling group that is created for your node group. List all of your Subnet in here |
| secondarySubnets | Array of strings <= 10 items List of secondary subnets for the node group. Maximum 10 subnets are allowed. List all of your Secondary subnet in here |
object (NodeGroupAutoScaleConfigDto) Configuration for node group autoscaling | |
required | object Upgrade configuration for node group |
object (PlacementGroupConfigDto) Placement group configuration for node group |
{- "name": "nodegroup-01",
- "numNodes": 3,
- "imageId": "img-db7784d2-4516-478e-939f-35a04ac50617",
- "flavorId": "flavor-7a7a8610-34f5-11ee-be56-0242ac120002",
- "diskSize": 100,
- "diskType": "vtype-7a7a8610-34f5-11ee-be56-0242ac120002",
- "enablePrivateNodes": true,
- "enabledEncryptionVolume": true,
- "securityGroups": [
- "secg-3b7c5f10-e417-4847-bf84-08d03365c61f",
- "secg-4b7c5f10-e417-4847-bf84-08d03365c61f"
], - "sshKeyId": "ssh-d4cf9811-5806-4289-ba15-54378663726b",
- "labels": {
- "vks.io/cluster-name": "vks-cluster-01",
- "vks.io/node-role": "worker"
}, - "taints": [
- {
- "key": "taint-key01",
- "value": "taint-value01",
- "effect": "NoSchedule"
}, - {
- "key": "taint-key02",
- "value": "taint-value02",
- "effect": "PreferNoSchedule"
}
], - "subnetId": "sub-3b7c5f10-e417-4847-bf84-08d03365c61f",
- "secondarySubnets": [
- "10.2.1.0/24",
- "10.2.2.0/24"
], - "autoScaleConfig": {
- "minSize": 1,
- "maxSize": 10
}, - "upgradeConfig": {
- "strategy": "SURGE",
- "maxSurge": 2,
- "maxUnavailable": 1
}, - "placementGroupConfigDto": {
- "type": "NEW",
- "placementGroupId": "server-group-06b86747-eaf7-47dd-9e41-579c2e30bfdd",
- "placementGroupName": "placement-group-vks-dev"
}
}{- "id": "ng-123",
- "clusterId": "cluster-123",
- "name": "my-node-group",
- "status": "CREATING",
- "numNodes": 3,
- "imageId": "image-123",
- "createdAt": "2023-10-01T12:00:00.000Z",
- "updatedAt": "2023-10-01T12:00:00.000Z"
}| clusterId required | string ID of the cluster |
| nodeGroupId required | string ID of the node group |
const request = require('request'); const options = { method: 'GET', url: 'https://vks.api.vngcloud.vn/v1/clusters/%7BclusterId%7D/node-groups/%7BnodeGroupId%7D', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'} }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); });
{- "id": "ng-123",
- "clusterId": "cluster-123",
- "name": "my-node-group",
- "status": "CREATING",
- "numNodes": 3,
- "imageId": "image-123",
- "createdAt": "2023-10-01T12:00:00.000Z",
- "updatedAt": "2023-10-01T12:00:00.000Z",
- "flavorId": "flavor-7a7a8610-34f5-11ee-be56-0242ac120002",
- "diskSize": 0,
- "diskType": "vtype-7a7a8610-34f5-11ee-be56-0242ac120002",
- "enablePrivateNodes": true,
- "sshKeyId": "ssh-d4cf9811-5806-4289-ba15-54378663726b",
- "imageOS": "ubuntu",
- "securityGroups": [
- "string"
], - "autoScaleConfig": {
- "minSize": 1,
- "maxSize": 10
}, - "upgradeConfig": {
- "strategy": "SURGE",
- "maxSurge": 2,
- "maxUnavailable": 1
}, - "labels": {
- "property1": "string",
- "property2": "string"
}, - "taints": [
- {
- "key": "taint-key-01",
- "value": "taint-value-01",
- "effect": "NoSchedule"
}
], - "subnetId": "sub-3b7c5f10-e417-4847-bf84-08d03365c61f",
- "secondarySubnets": [
- "string"
], - "enabledEncryptionVolume": false,
- "dnsServiceConfig": {
- "projectId": "pro-462803f3-6858-466f-bf05-df2b33faa360",
- "vpcId": "net-4b949f7a-8b20-424d-80c8-ada457e784e0",
- "subnetId": "sub-7b14c40a-195d-4371-af85-ca17fc08932c",
- "vpcCidr": "10.0.0.0/16",
- "virtualAddressIp": "10.0.0.10"
}, - "placementGroupId": "server-group-06b86747-eaf7-47dd-9e41-579c2e30bfdd"
}| clusterId required | string ID of the cluster |
| nodeGroupId required | string ID of the node group |
Update node group body
| numNodes required | integer <int32> >= 0 The number of nodes to create in this cluster's node group. The number of nodes are between 1 and 10 nodes. If auto_scale_config is set, num_nodes need to be greater than or equal to Minimum node, and less than or equal to Maximum node. If auto_scale_config is not set, num_nodes need to be greater than or equal to 0, and less than or equal to 10. |
| securityGroups required | Array of strings [ 1 .. 50 ] items Specifies the security group for your cluster. A security group acts as a virtual firewall, controlling inbound and outbound traffic for associated resources. You can find the Security Group ID on the vServer Portal and input it here. |
| imageId required | string [ 1 .. 50 ] characters [ 1 .. 50 ] Specifies the image you want to use for your node group. You can obtain the Image ID from the VKS Portal or from this link and enter it in this field. List all of our Image ID in here |
object Labels to be applied to the nodes in the node group. A maximum of 50 labels is allowed. Each label key must have two segments: an optional prefix and name, separated by a slash (/). The name segment is required and must be 63 characters or less, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between. The prefix is optional. If specified, the prefix must be a DNS subdomain: a series of DNS labels separated by dots (.), not longer than 253 characters in total, followed by a slash (/). | |
Array of objects (NodeGroupTaintDto) <= 50 items The Kubernetes taints to be applied to the nodes in the node group. Maximum 50 taints are allowed. | |
object (NodeGroupAutoScaleConfigDto) Configuration for node group autoscaling | |
required | object Upgrade configuration for node group |
{- "numNodes": 3,
- "securityGroups": [
- "secg-3b7c5f10-e417-4847-bf84-08d03365c61f",
- "secg-4b7c5f10-e417-4847-bf84-08d03365c61f"
], - "imageId": "img-db7784d2-4516-478e-939f-35a04ac50617",
- "labels": {
- "vks.io/cluster-name": "vks-cluster-01",
- "vks.io/node-role": "worker"
}, - "taints": [
- {
- "key": "taint-key01",
- "value": "taint-value01",
- "effect": "NoSchedule"
}, - {
- "key": "taint-key02",
- "value": "taint-value02",
- "effect": "PreferNoSchedule"
}
], - "autoScaleConfig": {
- "minSize": 1,
- "maxSize": 10
}, - "upgradeConfig": {
- "strategy": "SURGE",
- "maxSurge": 2,
- "maxUnavailable": 1
}
}{- "id": "ng-123",
- "clusterId": "cluster-123",
- "name": "my-node-group",
- "status": "CREATING",
- "numNodes": 3,
- "imageId": "image-123",
- "createdAt": "2023-10-01T12:00:00.000Z",
- "updatedAt": "2023-10-01T12:00:00.000Z"
}| clusterId required | string ID of the cluster |
| nodeGroupId required | string ID of the node group |
| forceDelete | boolean Default: false Enable force delete node group |
const request = require('request'); const options = { method: 'DELETE', url: 'https://vks.api.vngcloud.vn/v1/clusters/%7BclusterId%7D/node-groups/%7BnodeGroupId%7D', qs: {forceDelete: 'SOME_BOOLEAN_VALUE'}, headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'} }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); });
{- "id": "ng-123",
- "clusterId": "cluster-123",
- "name": "my-node-group",
- "status": "CREATING",
- "numNodes": 3,
- "imageId": "image-123",
- "createdAt": "2023-10-01T12:00:00.000Z",
- "updatedAt": "2023-10-01T12:00:00.000Z"
}| clusterId required | string ID of the cluster |
| nodeGroupId required | string ID of the node group |
| action | string Default: "" Example: action=CreateServer Even action name |
| page | integer <int32> >= 0 Default: 0 Example: page=0 Page number |
| pageSize | integer <int32> >= 1 Default: 10 Example: pageSize=10 Page size |
| type | string Default: "" Example: type=Normal Event type |
const request = require('request'); const options = { method: 'GET', url: 'https://vks.api.vngcloud.vn/v1/clusters/%7BclusterId%7D/node-groups/%7BnodeGroupId%7D/events', qs: {action: 'CreateServer', page: '0', pageSize: '10', type: 'Normal'}, headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'} }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); });
{- "items": [
- {
- "type": "NORMAL",
- "action": "CreateServer",
- "message": "Created a new server with name demo (ID: ins-99b1b6be-503a-4f9f-b755-5f8dff4c58d8).",
- "createdAt": "2025-07-04T09:30:00.000Z"
}
], - "total": 150,
- "page": 0,
- "pageSize": 10
}| clusterId required | string ID of the cluster |
| nodeGroupId required | string ID of the node group |
| page | integer <int32> >= 0 Default: 0 Example: page=0 Page number |
| pageSize | integer <int32> >= 1 Default: 10 Example: pageSize=10 Page size |
const request = require('request'); const options = { method: 'GET', url: 'https://vks.api.vngcloud.vn/v1/clusters/%7BclusterId%7D/node-groups/%7BnodeGroupId%7D/nodes', qs: {page: '0', pageSize: '10'}, headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'} }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); });
{- "items": [
- {
- "id": "string",
- "name": "string",
- "status": "string",
- "floatingIp": "string",
- "fixedIp": "string",
- "ready": true,
- "poc": true
}
], - "total": 150,
- "page": 0,
- "pageSize": 10
}const request = require('request'); const options = { method: 'GET', url: 'https://vks.api.vngcloud.vn/v1/node-group-images', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'} }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); });
[- {
- "id": "img-db7784d2-4516-478e-939f-35a04ac50617",
- "os": "ubuntu",
- "kubernetesVersion": "1.29.1",
- "enable": true,
- "stage": "STABLE"
}
]const request = require('request'); const options = { method: 'GET', url: 'https://vks.api.vngcloud.vn/v1/quota', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'} }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); });
{- "maxClusters": 10,
- "numClusters": 3,
- "maxNodeGroupsPerCluster": 5,
- "maxNodesPerNodeGroup": 100
}const request = require('request'); const options = { method: 'GET', url: 'https://vks.api.vngcloud.vn/v1/workspace', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'} }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); });
{- "projectId": "pro-e28d4501-59d8-4f47-9eb0-948c54f80592",
- "serviceAccountId": "b2c33d35-1090-4182-af04-40ae428347d3",
- "status": "ACTIVE",
- "statusReason": "Provisioning failed due to network issue"
}const request = require('request'); const options = { method: 'POST', url: 'https://vks.api.vngcloud.vn/v1/workspace', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'} }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); });
{- "error": {
- "message": "Invalid request parameter"
}
}const request = require('request'); const options = { method: 'POST', url: 'https://vks.api.vngcloud.vn/v1/workspace/reset-service-account', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'} }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); });
{- "projectId": "pro-e28d4501-59d8-4f47-9eb0-948c54f80592",
- "serviceAccountId": "b2c33d35-1090-4182-af04-40ae428347d3",
- "status": "ACTIVE",
- "statusReason": "Provisioning failed due to network issue"
}