Skip to content
DocsOpenAPI spec

    Get NKS Cluster Details

    client.NKS.Clusters.Get(ctx, clusterID) (*NKSCluster, error)
    GET/v1/nks/clusters/{cluster_id}

    Get details about an NKS cluster

    ParametersExpand Collapse
    clusterID string
    ReturnsExpand Collapse
    type NKSCluster struct{…}

    NKS Cluster details.

    ID string

    Unique identifier for the Cluster.

    Autoscaling bool

    Whether autoscaling is enabled for the Cluster.

    CreatedAt Time

    When the Cluster was created.

    formatdate-time
    KubernetesVersion string

    Kubernetes version of the Cluster.

    ManagedBy NKSClusterManagedBy

    What manages the resource, or null when nothing does. A managed resource can be read but not changed.

    ID string

    ID of the thing managing the resource.

    Type string

    Kind of thing managing the resource.

    Name string

    Name of the Cluster.

    PoolIDs []string

    IDs of pools belonging to this Cluster.

    PrivateIP string

    Private IP (VIP) of the Cluster.

    ProjectID string

    Project ID the Cluster belongs to.

    PublicIP string

    Public IP of the Cluster.

    Region RegionName

    Region the resource is in.

    One of the following:
    const RegionNameUsSva2 RegionName = "us-sva-2"
    const RegionNameUsWdc1 RegionName = "us-wdc-1"

    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"
    const ResourceStatusSuspended ResourceStatus = "suspended"
    Tags []string

    Tags attached to the Cluster.

    UpdatedAt Time

    When the Cluster was last updated.

    formatdate-time
    VPCID string

    ID of the VPC the Cluster is in.

    Get NKS Cluster Details

    package main
    
    import (
      "context"
      "fmt"
    
      "github.com/nirvana-labs/nirvana-go"
      "github.com/nirvana-labs/nirvana-go/option"
    )
    
    func main() {
      client := nirvana.NewClient(
        option.WithAPIKey("My API Key"),
      )
      nksCluster, err := client.NKS.Clusters.Get(context.TODO(), "cluster_id")
      if err != nil {
        panic(err.Error())
      }
      fmt.Printf("%+v\n", nksCluster.ID)
    }
    
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "autoscaling": true,
      "created_at": "2025-01-01T00:00:00Z",
      "kubernetes_version": "v1.34.4",
      "managed_by": {
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "type": "sandbox_cluster"
      },
      "name": "my-cluster",
      "pool_ids": [
        "123e4567-e89b-12d3-a456-426614174000"
      ],
      "private_ip": "10.0.0.254",
      "project_id": "123e4567-e89b-12d3-a456-426614174000",
      "public_ip": "198.51.100.1",
      "region": "us-sva-2",
      "status": "ready",
      "tags": [
        "production",
        "ethereum"
      ],
      "updated_at": "2025-01-01T00:00:00Z",
      "vpc_id": "123e4567-e89b-12d3-a456-426614174000"
    }
    Returns Examples
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "autoscaling": true,
      "created_at": "2025-01-01T00:00:00Z",
      "kubernetes_version": "v1.34.4",
      "managed_by": {
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "type": "sandbox_cluster"
      },
      "name": "my-cluster",
      "pool_ids": [
        "123e4567-e89b-12d3-a456-426614174000"
      ],
      "private_ip": "10.0.0.254",
      "project_id": "123e4567-e89b-12d3-a456-426614174000",
      "public_ip": "198.51.100.1",
      "region": "us-sva-2",
      "status": "ready",
      "tags": [
        "production",
        "ethereum"
      ],
      "updated_at": "2025-01-01T00:00:00Z",
      "vpc_id": "123e4567-e89b-12d3-a456-426614174000"
    }