Skip to content
Docs

List NKS Node Pools

client.NKS.Clusters.Pools.List(ctx, clusterID, query) (*Cursor[NKSNodePool], error)
GET/v1/nks/clusters/{cluster_id}/pools

List all node pools in an NKS cluster

ParametersExpand Collapse
clusterID string
query ClusterPoolListParams
Cursor param.Field[string]Optional

Pagination cursor returned by a previous request

Limit param.Field[int64]Optional

Maximum number of items to return

maximum100
minimum10
ReturnsExpand Collapse
type NKSNodePool struct{…}

NKS node pool details.

ID string

Unique identifier for the node pool.

ClusterID string

ID of the Cluster this node pool belongs to.

CreatedAt Time

When the node pool was created.

formatdate-time
Name string

Name of the node pool.

Node configuration.

Boot volume configuration.

Size int64

Size of the boot volume in GB.

maximum512
minimum64

Type of the Volume.

One of the following:
const VolumeTypeNvme VolumeType = "nvme"
const VolumeTypeABS VolumeType = "abs"
InstanceType string

Instance type name.

Labels []string

Kubernetes labels applied to each node in the pool. Each entry is “key=value”.

NodeCount int64

Number of nodes.

Status of the resource.

One of the following:
const ResourceStatusPending ResourceStatus = "pending"
const ResourceStatusCreating ResourceStatus = "creating"
const ResourceStatusUpdating ResourceStatus = "updating"
const ResourceStatusReady ResourceStatus = "ready"
const ResourceStatusDeleting ResourceStatus = "deleting"
const ResourceStatusDeleted ResourceStatus = "deleted"
const ResourceStatusError ResourceStatus = "error"
Tags []string

Tags attached to the node pool.

UpdatedAt Time

When the node pool was last updated.

formatdate-time

List NKS Node Pools

package main

import (
  "context"
  "fmt"

  "github.com/nirvana-labs/nirvana-go"
  "github.com/nirvana-labs/nirvana-go/nks"
  "github.com/nirvana-labs/nirvana-go/option"
)

func main() {
  client := nirvana.NewClient(
    option.WithAPIKey("My API Key"),
  )
  page, err := client.NKS.Clusters.Pools.List(
    context.TODO(),
    "cluster_id",
    nks.ClusterPoolListParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", page)
}
{
  "items": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "cluster_id": "123e4567-e89b-12d3-a456-426614174000",
      "created_at": "2025-01-01T00:00:00Z",
      "name": "my-node-pool",
      "node_config": {
        "boot_volume": {
          "size": 100,
          "type": "abs"
        },
        "instance_type": "n1-standard-8",
        "labels": [
          "env=prod",
          "team=platform"
        ]
      },
      "node_count": 3,
      "status": "ready",
      "tags": [
        "production",
        "ethereum"
      ],
      "updated_at": "2025-01-01T00:00:00Z"
    }
  ],
  "pagination": {
    "next_cursor": "RhwniMT4B74siYZcPF8TnCdGI1l9rpPvg",
    "previous_cursor": "ARhwnmi1hA7wEbHbMjdYQlOB_ZusP4fYvw",
    "total_count": 125
  }
}
Returns Examples
{
  "items": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "cluster_id": "123e4567-e89b-12d3-a456-426614174000",
      "created_at": "2025-01-01T00:00:00Z",
      "name": "my-node-pool",
      "node_config": {
        "boot_volume": {
          "size": 100,
          "type": "abs"
        },
        "instance_type": "n1-standard-8",
        "labels": [
          "env=prod",
          "team=platform"
        ]
      },
      "node_count": 3,
      "status": "ready",
      "tags": [
        "production",
        "ethereum"
      ],
      "updated_at": "2025-01-01T00:00:00Z"
    }
  ],
  "pagination": {
    "next_cursor": "RhwniMT4B74siYZcPF8TnCdGI1l9rpPvg",
    "previous_cursor": "ARhwnmi1hA7wEbHbMjdYQlOB_ZusP4fYvw",
    "total_count": 125
  }
}