Get cluster list

Prev Next

Available in VPC

Get the cluster list.

Request

This section describes the request format. The method and URI are as follows:

Method URI
GET /vnks/v2/clusters (Korea Region)
GET /vnks/sgn-v2/clusters (Singapore Region)
GET /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 example

The request example is as follows:

curl --location --request GET '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'

Response

This section describes the response format.

Response body

The response body includes the following data:

Field Type Required Description
clusters[] Array - Cluster list
clusters[].cpuCount Integer - Number of CPUs
clusters[].memorySize Integer - Total memory capacity
clusters[].status String - Cluster status
clusters[].nodeCount Integer - Total number of nodes registered
clusters[].nodeMaxCount Integer - Maximum number of available nodes
clusters[].clusterType String - Cluster type
clusters[].hypervisorCode String - Hypervisor code
clusters[].instanceNo Integer - Instance number
clusters[].id Integer - Cluster ID
clusters[].acgName String - ACG name
clusters[].acgNo Integer - ACG number
clusters[].capacity String - Cluster capacity
clusters[].createdAt String - Cluster creation date and time
clusters[].updatedAt String - Last update date and time
clusters[].endpoint String - Control Plane API address
clusters[].uuid String - Cluster UUID
clusters[].name String - Cluster name
clusters[].k8sVersion String - Kubernetes version
clusters[].regionCode String - Region code
clusters[].kuberNetworkPlugin String - CNI plugin code
clusters[].vpcNo Integer - VPC ID
clusters[].subnetNoList[] Array - Subnet ID list
clusters[].subnetLbNo Integer - @deprecated Load Balancer-only subnet ID
clusters[].lbPivateSubnetNo Integer - Load balancer private subnet ID
clusters[].lbPivateSubnetName String - Load balancer private subnet name
clusters[].lbPublicSubnetNo Integer - Load balancer private subnet number
clusters[].lbPublicSubnetName String - Load balancer private subnet name
clusters[].vpcName String - VPC name
clusters[].subnetName String - @deprecated Subnet name
clusters[].subnetNameList[] Array - Subnet name list
clusters[].subnetLbName String - @deprecated Load Balancer-only subnet name
clusters[].loginKeyName String - Authentication key name
clusters[].zoneCode String - Zone code
clusters[].zoneNo Integer - Zone number
clusters[].log Array - Log list
clusters[].log.audit Boolean - Set audit log
clusters[].publicNetwork Boolean - Public Network
clusters[].iamAuth Boolean - Whether IAM authentication is enabled
clusters[].isDefaultIamAuth Boolean - Whether the cluster is subject to default IAM authentication
clusters[].isRegional Boolean - Whether the cluster is a multi-zone (regional) cluster
clusters[].returnProtection Boolean - Whether termination protection is enabled
clusters[].kmsKeyTag String - KMS key tag used for secret encryption
clusters[].authType String - Cluster authentication method
clusters[].nodePool[] Array - NodePool list

nodePool

The following describes nodePool.

Field Type Required Description
nodePool[].instanceNo Integer - NodePool instance number
nodePool[].k8sVersion String - NodePool Kubernetes version
nodePool[].name String - NodePool name
nodePool[].nodeCount Integer - Number of nodes
nodePool[].subnetNoList[] Array - NodePool subnet number list
nodePool[].subnetNameList[] Array - @deprecated NodePool subnet name list
nodePool[].softwareCode String - Software code
nodePool[].productCode String - Product code
nodePool[].serverSpecCode String - Server specification code
nodePool[].storageSize Integer - Storage size
nodePool[].status String - NodePool status
nodePool[].autoscale Array - Autoscaling list
nodePool[].autoscale.enabled Boolean - Whether auto scaling is enabled
nodePool[].autoscale.min Integer - Minimum number of nodes
nodePool[].autoscale.max Integer - Maximum number of nodes
nodePool[].serverRoleId String - IAM server role ID
nodePool[].fabricCluster Object - Fabric cluster information
nodePool[].fabricCluster.poolName String - Fabric cluster pool name
nodePool[].fabricCluster.poolNo Integer - Fabric cluster pool number

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:

{
    "clusters": [
        {
            "cpuCount": 2,
            "memorySize": 8,
            "status": "RUNNING",
            "nodeCount": 1,
            "nodeMaxCount": 1,
            "clusterType": "AAA.VNKS.STAND.C002.M008.G000",
            "hypervisorCode": "KVM",
            "instanceNo": 23320000,
            "id": 14000,
            "acgName": "nks-14000-acgname",
            "acgNo": 160009,
            "capacity": "vCPU 2EA, Memory 8GB",
            "createdAt": "2024-03-28T07:30:59.000Z",
            "updatedAt": "2024-03-28T07:47:53.000Z",
            "endpoint": "https://****a20e-e0fb-4dc9-af1b-97fd3f8d****.kr.vnks.ntruss.com",
            "uuid": "****a20e-e0fb-4dc9-af1b-97fd3f8d****",
            "name": "cluster00",
            "k8sVersion": "1.27.9-nks.2",
            "regionCode": "KR",
            "kubeNetworkPlugin": "cilium",
            "vpcNo": 59000,
            "subnetNoList": [
                139000
            ],
            "subnetLbNo": 139000,
            "lbPrivateSubnetNo": 139000,
            "lbPrivateSubnetName": "k8s-lbsubnet2 | KR-1 | 0.0.0.0/0 | Private",
            "lbPublicSubnetNo": 139000,
            "lbPublicSubnetName": "k8s-lbsubnet | KR-1 | 0.0.0.0/0 | Public",
            "vpcName": "k8s-vpc | 0.0.0.0/0",
            "subnetName": "k8s-subnet",
            "subnetNameList": [
                "k8s-subnet | KR-1 | 0.0.0.0/0 | Public"
            ],
            "subnetLbName": "k8s-lbsubnet2 | KR-1 | 0.0.0.0/0 | Private",
            "loginKeyName": "a123",
            "zoneCode": "KR-1",
            "zoneNo": 2,
            "log": {
                "audit": false
            },
            "publicNetwork": true,
            "iamAuth": true,
            "isDefaultIamAuth": true,
            "isRegional": false,
            "returnProtection": false,
            "authType": "CONFIG_MAP",
            "kmsKeyTag": "****83e65495374b9cf590a783f442fd50eb48c54eb56774de1ff62bcda4****",
            "nodePool": [
                {
                    "instanceNo": 23320000,
                    "k8sVersion": "1.27.9",
                    "name": "nodepool",
                    "nodeCount": 1,
                    "subnetNoList": [],
                    "subnetNameList": [],
                    "softwareCode": "SW.AAAA.OS.LNX64.UBNTU.SVR22.WRKND.AAAA",
                    "productCode": "SVR.AAAA.STAND.C002.M008.AAAA",
                    "serverSpecCode": "s2-g3",
                    "storageSize": 100,
                    "status": "RUN",
                    "serverRoleId": "***1fdc0-eb90-11ec-a2d9-246e966eb***",
                    "autoscale": {
                        "enabled": false,
                        "min": 0,
                        "max": 0
                    }
                }
            ]
        }
    ]
}