## 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

### Parameters

- `clusterID string`

- `query ClusterPoolListParams`

  - `Cursor param.Field[string]`

    Pagination cursor returned by a previous request

  - `Limit param.Field[int64]`

    Maximum number of items to return

### Returns

- `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.

  - `Name string`

    Name of the node pool.

  - `NodeConfig NKSNodePoolNodeConfigResponse`

    Node configuration.

    - `BootVolume NKSNodePoolBootVolumeResponse`

      Boot volume configuration.

      - `Size int64`

        Size of the boot volume in GB.

      - `Type VolumeType`

        Type of the Volume.

        - `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 ResourceStatus`

    Status of the resource.

    - `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.

### Example

```go
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)
}
```

#### Response

```json
{
  "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
  }
}
```
