VKS API (1.0.0)

Download OpenAPI specification:Download

Authorization document available at https://docs.api.vngcloud.vn/#api-documentation

Cluster Controller

Get the list of clusters

query Parameters
id
string
Default: ""
name
string
Default: ""
page
integer <int32> >= 0
Default: 0
pageSize
integer <int32> >= 1
Default: 10
status
string
Default: ""
version
string
Default: ""
header Parameters
Authorization
required
string
Example: Bearer <your-token>

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://vks.api.vngcloud.vn/v1/clusters',
  qs: {
    id: 'SOME_STRING_VALUE',
    name: 'SOME_STRING_VALUE',
    page: 'SOME_INTEGER_VALUE',
    pageSize: 'SOME_INTEGER_VALUE',
    status: 'SOME_STRING_VALUE',
    version: 'SOME_STRING_VALUE'
  },
  headers: {Authorization: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "total": 0,
  • "page": 0,
  • "pageSize": 0
}

Create a cluster

query Parameters
autoRenewal
boolean
Default: true
poc
boolean
Default: false
header Parameters
Authorization
required
string
Example: Bearer <your-token>
Request Body schema: application/json
name
required
string^[a-z0-9\-]{5,20}$
description
string^[a-zA-Z0-9-_. @]{0,255}$
releaseChannel
required
string (ClusterVersionStage)
Enum: "RAPID" "STABLE"
version
required
string [ 1 .. 50 ] characters
enablePrivateCluster
required
boolean
networkType
required
string^CALICO|CILIUM_OVERLAY|CILIUM_NATIVE_ROUTING$...
vpcId
required
string [ 1 .. 50 ] characters
subnetId
required
string [ 1 .. 50 ] characters
cidr
string
enabledLoadBalancerPlugin
boolean
enabledBlockStoreCsiPlugin
boolean
enabledServiceEndpoint
boolean
secondarySubnets
Array of strings <= 10 items
nodeNetmaskSize
integer <int32> [ 24 .. 26 ]
object (ClusterAutoUpgradeConfigDto)
required
Array of objects (CreateNodeGroupDto)

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "description": "string",
  • "releaseChannel": "RAPID",
  • "version": "string",
  • "enablePrivateCluster": true,
  • "networkType": "string",
  • "vpcId": "string",
  • "subnetId": "string",
  • "cidr": "string",
  • "enabledLoadBalancerPlugin": true,
  • "enabledBlockStoreCsiPlugin": true,
  • "enabledServiceEndpoint": true,
  • "secondarySubnets": [
    ],
  • "nodeNetmaskSize": 24,
  • "autoUpgradeConfig": {
    },
  • "nodeGroups": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "description": "string",
  • "status": "string",
  • "releaseChannel": "RAPID",
  • "version": "string",
  • "numNodes": 0,
  • "enablePrivateCluster": true,
  • "createdAt": "2022-03-10T00:00:00.000Z",
  • "updatedAt": "2022-03-10T00:00:00.000Z"
}

Get the cluster by ID

path Parameters
clusterId
required
string
header Parameters
Authorization
required
string
Example: Bearer <your-token>

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://vks.api.vngcloud.vn/v1/clusters/%7BclusterId%7D',
  headers: {Authorization: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "description": "string",
  • "status": "string",
  • "releaseChannel": "RAPID",
  • "version": "string",
  • "numNodes": 0,
  • "enablePrivateCluster": true,
  • "createdAt": "2022-03-10T00:00:00.000Z",
  • "updatedAt": "2022-03-10T00:00:00.000Z",
  • "networkType": "CALICO",
  • "vpcId": "string",
  • "subnetId": "string",
  • "secondarySubnets": [
    ],
  • "cidr": "string",
  • "enabledLoadBalancerPlugin": true,
  • "enabledBlockStoreCsiPlugin": true,
  • "enabledServiceEndpoint": true,
  • "whitelistNodeCIDRs": [
    ],
  • "poc": true,
  • "autoRenewal": true,
  • "nodeNetmaskSize": 0,
  • "serviceEndpoint": {
    },
  • "location": "string",
  • "autoUpgradeConfig": {
    }
}

Update the cluster by cluster ID

path Parameters
clusterId
required
string
header Parameters
Authorization
required
string
Example: Bearer <your-token>
Request Body schema: application/json
version
required
string [ 1 .. 50 ] characters
whitelistNodeCIDRs
required
Array of strings [ 1 .. 20 ] items
enabledLoadBalancerPlugin
boolean
enabledBlockStoreCsiPlugin
boolean

Responses

Request samples

Content type
application/json
{
  • "version": "string",
  • "whitelistNodeCIDRs": [
    ],
  • "enabledLoadBalancerPlugin": true,
  • "enabledBlockStoreCsiPlugin": true
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "description": "string",
  • "status": "string",
  • "releaseChannel": "RAPID",
  • "version": "string",
  • "numNodes": 0,
  • "enablePrivateCluster": true,
  • "createdAt": "2022-03-10T00:00:00.000Z",
  • "updatedAt": "2022-03-10T00:00:00.000Z"
}

Delete the cluster by ID

path Parameters
clusterId
required
string
header Parameters
Authorization
required
string
Example: Bearer <your-token>

Responses

Request samples

const request = require('request');

const options = {
  method: 'DELETE',
  url: 'https://vks.api.vngcloud.vn/v1/clusters/%7BclusterId%7D',
  headers: {Authorization: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "description": "string",
  • "status": "string",
  • "releaseChannel": "RAPID",
  • "version": "string",
  • "numNodes": 0,
  • "enablePrivateCluster": true,
  • "createdAt": "2022-03-10T00:00:00.000Z",
  • "updatedAt": "2022-03-10T00:00:00.000Z"
}

Configure auto-upgrade for the cluster by ID

path Parameters
clusterId
required
string
header Parameters
Authorization
required
string
Example: Bearer <your-token>
Request Body schema: application/json
weekdays
required
string
time
required
string

Responses

Request samples

Content type
application/json
{
  • "weekdays": "string",
  • "time": "string"
}

Delete the auto-upgrade config by cluster ID

path Parameters
clusterId
required
string
header Parameters
Authorization
required
string
Example: Bearer <your-token>

Responses

Request samples

const request = require('request');

const options = {
  method: 'DELETE',
  url: 'https://vks.api.vngcloud.vn/v1/clusters/%7BclusterId%7D/auto-upgrade-config',
  headers: {Authorization: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Get the list of events in a cluster

path Parameters
clusterId
required
string
query Parameters
action
string
Default: ""
page
integer <int32> >= 0
Default: 0
pageSize
integer <int32> >= 1
Default: 10
type
string
Default: ""
header Parameters
Authorization
required
string
Example: Bearer <your-token>

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://vks.api.vngcloud.vn/v1/clusters/%7BclusterId%7D/events',
  qs: {
    action: 'SOME_STRING_VALUE',
    page: 'SOME_INTEGER_VALUE',
    pageSize: 'SOME_INTEGER_VALUE',
    type: 'SOME_STRING_VALUE'
  },
  headers: {Authorization: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "total": 0,
  • "page": 0,
  • "pageSize": 0
}

Get the Kubernetes config by cluster ID

path Parameters
clusterId
required
string
header Parameters
Authorization
required
string
Example: Bearer <your-token>

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://vks.api.vngcloud.vn/v1/clusters/%7BclusterId%7D/kubeconfig',
  headers: {Authorization: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Stop POC by cluster ID

path Parameters
clusterId
required
string
header Parameters
Authorization
required
string
Example: Bearer <your-token>

Responses

Request samples

const request = require('request');

const options = {
  method: 'POST',
  url: 'https://vks.api.vngcloud.vn/v1/clusters/%7BclusterId%7D/stop-poc',
  headers: {Authorization: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Get the list of upgrade insights by cluster ID

path Parameters
clusterId
required
string
query Parameters
page
integer <int32> >= 0
Default: 0
pageSize
integer <int32> >= 1
Default: 10
header Parameters
Authorization
required
string
Example: Bearer <your-token>

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://vks.api.vngcloud.vn/v1/clusters/%7BclusterId%7D/upgrade-insight',
  qs: {page: 'SOME_INTEGER_VALUE', pageSize: 'SOME_INTEGER_VALUE'},
  headers: {Authorization: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "total": 0,
  • "page": 0,
  • "pageSize": 0
}

Cluster Version Controller

Get the list of cluster versions

header Parameters
Authorization
required
string
Example: Bearer <your-token>

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://vks.api.vngcloud.vn/v1/cluster-versions',
  headers: {Authorization: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
[
  • {
    }
]

Node Group Controller

Get the list of node groups by cluster ID

path Parameters
clusterId
required
string
query Parameters
page
integer <int32> >= 0
Default: 0
pageSize
integer <int32> >= 1
Default: 10
header Parameters
Authorization
required
string
Example: Bearer <your-token>

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://vks.api.vngcloud.vn/v1/clusters/%7BclusterId%7D/node-groups',
  qs: {page: 'SOME_INTEGER_VALUE', pageSize: 'SOME_INTEGER_VALUE'},
  headers: {Authorization: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "total": 0,
  • "page": 0,
  • "pageSize": 0
}

Create a node group

path Parameters
clusterId
required
string
header Parameters
Authorization
required
string
Example: Bearer <your-token>
Request Body schema: application/json
name
required
string^[a-z0-9-]{5,15}$
numNodes
required
integer <int32> >= 0
object (NodeGroupAutoScaleConfigDto)
required
object (NodeGroupUpgradeConfigDto)
imageId
required
string [ 1 .. 50 ] characters
flavorId
required
string [ 1 .. 50 ] characters
diskSize
required
integer <int32> [ 20 .. 5000 ]
diskType
required
string [ 1 .. 50 ] characters
enablePrivateNodes
required
boolean
enabledEncryptionVolume
boolean
securityGroups
required
Array of strings
sshKeyId
required
string [ 1 .. 50 ] characters
object
Array of objects (NodeGroupTaintDto) <= 50 items
subnetId
string [ 1 .. 50 ] characters
secondarySubnets
Array of strings <= 10 items

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "numNodes": 0,
  • "autoScaleConfig": {
    },
  • "upgradeConfig": {
    },
  • "imageId": "string",
  • "flavorId": "string",
  • "diskSize": 20,
  • "diskType": "string",
  • "enablePrivateNodes": true,
  • "enabledEncryptionVolume": true,
  • "securityGroups": [
    ],
  • "sshKeyId": "string",
  • "labels": {
    },
  • "taints": [
    ],
  • "subnetId": "string",
  • "secondarySubnets": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "clusterId": "string",
  • "name": "string",
  • "status": "string",
  • "numNodes": 0,
  • "imageId": "string",
  • "createdAt": "2022-03-10T00:00:00.000Z",
  • "updatedAt": "2022-03-10T00:00:00.000Z"
}

Get the node group details by ID

path Parameters
clusterId
required
string
nodeGroupId
required
string
header Parameters
Authorization
required
string
Example: Bearer <your-token>

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://vks.api.vngcloud.vn/v1/clusters/%7BclusterId%7D/node-groups/%7BnodeGroupId%7D',
  headers: {Authorization: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "id": "string",
  • "clusterId": "string",
  • "name": "string",
  • "status": "string",
  • "numNodes": 0,
  • "imageId": "string",
  • "createdAt": "2022-03-10T00:00:00.000Z",
  • "updatedAt": "2022-03-10T00:00:00.000Z",
  • "flavorId": "string",
  • "diskSize": 0,
  • "diskType": "string",
  • "enablePrivateNodes": true,
  • "sshKeyId": "string",
  • "imageOS": "string",
  • "securityGroups": [
    ],
  • "autoScaleConfig": {
    },
  • "upgradeConfig": {
    },
  • "labels": {
    },
  • "taints": [
    ],
  • "subnetId": "string",
  • "secondarySubnets": [
    ],
  • "enabledEncryptionVolume": true,
  • "dnsServiceConfig": {
    }
}

Get the list of nodes in the node group

path Parameters
clusterId
required
string
nodeGroupId
required
string
header Parameters
Authorization
required
string
Example: Bearer <your-token>
Request Body schema: application/json
object (NodeGroupAutoScaleConfigDto)
numNodes
integer <int32> >= 0
required
object (NodeGroupUpgradeConfigDto)
securityGroups
required
Array of strings
imageId
required
string [ 1 .. 50 ] characters
object
Array of objects (NodeGroupTaintDto) <= 50 items

Responses

Request samples

Content type
application/json
{
  • "autoScaleConfig": {
    },
  • "numNodes": 0,
  • "upgradeConfig": {
    },
  • "securityGroups": [
    ],
  • "imageId": "string",
  • "labels": {
    },
  • "taints": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "clusterId": "string",
  • "name": "string",
  • "status": "string",
  • "numNodes": 0,
  • "imageId": "string",
  • "createdAt": "2022-03-10T00:00:00.000Z",
  • "updatedAt": "2022-03-10T00:00:00.000Z"
}

Delete the node group by ID

path Parameters
clusterId
required
string
nodeGroupId
required
string
header Parameters
Authorization
required
string
Example: Bearer <your-token>

Responses

Request samples

const request = require('request');

const options = {
  method: 'DELETE',
  url: 'https://vks.api.vngcloud.vn/v1/clusters/%7BclusterId%7D/node-groups/%7BnodeGroupId%7D',
  headers: {Authorization: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "id": "string",
  • "clusterId": "string",
  • "name": "string",
  • "status": "string",
  • "numNodes": 0,
  • "imageId": "string",
  • "createdAt": "2022-03-10T00:00:00.000Z",
  • "updatedAt": "2022-03-10T00:00:00.000Z"
}

Get the list of events in a node group

path Parameters
clusterId
required
string
nodeGroupId
required
string
query Parameters
action
string
Default: ""
page
integer <int32> >= 0
Default: 0
pageSize
integer <int32> >= 1
Default: 10
type
string
Default: ""
header Parameters
Authorization
required
string
Example: Bearer <your-token>

Responses

Request samples

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: 'SOME_STRING_VALUE',
    page: 'SOME_INTEGER_VALUE',
    pageSize: 'SOME_INTEGER_VALUE',
    type: 'SOME_STRING_VALUE'
  },
  headers: {Authorization: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "total": 0,
  • "page": 0,
  • "pageSize": 0
}

Get the list of nodes in the node group

path Parameters
clusterId
required
string
nodeGroupId
required
string
query Parameters
page
integer <int32> >= 0
Default: 0
pageSize
integer <int32> >= 1
Default: 10
header Parameters
Authorization
required
string
Example: Bearer <your-token>

Responses

Request samples

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: 'SOME_INTEGER_VALUE', pageSize: 'SOME_INTEGER_VALUE'},
  headers: {Authorization: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "total": 0,
  • "page": 0,
  • "pageSize": 0
}

Node Group Image Controller

Get the list of node group images

header Parameters
Authorization
required
string
Example: Bearer <your-token>

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://vks.api.vngcloud.vn/v1/node-group-images',
  headers: {Authorization: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
[
  • {
    }
]

Quota Controller

Get the quota of the user ID

header Parameters
Authorization
required
string
Example: Bearer <your-token>

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://vks.api.vngcloud.vn/v1/quota',
  headers: {Authorization: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "maxClusters": 0,
  • "numClusters": 0,
  • "maxNodeGroupsPerCluster": 0,
  • "maxNodesPerNodeGroup": 0
}

Workspace Controller

Get the workspace of the user ID

header Parameters
Authorization
required
string
Example: Bearer <your-token>

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://vks.api.vngcloud.vn/v1/workspace',
  headers: {Authorization: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "projectId": "string",
  • "serviceAccountId": "string",
  • "status": "string",
  • "statusReason": "string"
}

Create a workspace

header Parameters
Authorization
required
string
Example: Bearer <your-token>

Responses

Request samples

const request = require('request');

const options = {
  method: 'POST',
  url: 'https://vks.api.vngcloud.vn/v1/workspace',
  headers: {Authorization: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Reset the service account for the user ID

header Parameters
Authorization
required
string
Example: Bearer <your-token>

Responses

Request samples

const request = require('request');

const options = {
  method: 'POST',
  url: 'https://vks.api.vngcloud.vn/v1/workspace/reset-service-account',
  headers: {Authorization: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "projectId": "string",
  • "serviceAccountId": "string",
  • "status": "string",
  • "statusReason": "string"
}