> ## Documentation Index
> Fetch the complete documentation index at: https://www.latitude.sh/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Get a Kubernetes Cluster

> Retrieves detailed information about a Kubernetes cluster including its status, control plane, worker node details, and individual node information.




## OpenAPI

````yaml https://spec.speakeasy.com/latitude/latitude/latitude-sh-api-with-code-samples get /kubernetes_clusters/{kubernetes_cluster_id}
openapi: 3.0.1
info:
  title: Latitude.sh API
  version: '2023-06-01'
  description: >-
    The Latitude.sh API is a RESTful API to manage your Latitude.sh account. It
    allows you to perform the same actions as the Latitude.sh dashboard.
servers:
  - url: https://api.latitude.sh
    variables:
      latitude_api_key:
        default: <insert your api key here>
  - url: http://api.latitude.sh
    variables:
      latitude_api_key:
        default: <insert your api key here>
security: []
tags:
  - name: API keys
  - name: Billing
  - name: Elastic Ips
  - name: Events
  - name: Firewalls
  - name: IP Addresses
  - name: Kubernetes Clusters
  - name: Operating Systems
  - name: Plans
  - name: Private Networks
  - name: Projects
  - name: Regions
  - name: Roles
  - name: SSH Keys
  - name: Servers
  - name: Storage
  - name: Tags
  - name: Teams
  - name: Team members
  - name: Traffic
  - name: User data
  - name: User profile
  - name: VPN Sessions
  - name: Virtual machines
paths:
  /kubernetes_clusters/{kubernetes_cluster_id}:
    get:
      tags:
        - Kubernetes Clusters
      summary: Get a Kubernetes Cluster
      description: >
        Retrieves detailed information about a Kubernetes cluster including its
        status, control plane, worker node details, and individual node
        information.
      operationId: get-kubernetes-cluster
      parameters:
        - name: kubernetes_cluster_id
          in: path
          required: true
          description: >-
            The cluster ID (format: kc_<hash>) or cluster name. Both formats are
            accepted for backward compatibility.
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/vnd.api+json:
              examples:
                Success:
                  value:
                    data:
                      type: kubernetes_clusters
                      id: kc_pRMLydp0dQKr1
                      attributes:
                        name: my-cluster
                        phase: Provisioned
                        ready: true
                        control_plane_endpoint: https://api.my-cluster.example.com:6443
                        kubeconfig_url: /kubernetes_clusters/kc_pRMLydp0dQKr1/kubeconfig
                        location: SAN3
                        load_balancer_ips:
                          - 10.0.0.1
                        kubernetes_version: v1.34.3+rke2r1
                        version_status: upgrade_available
                        available_upgrade: v1.35.3+rke2r1
                        created_at: '2026-01-15T10:30:00Z'
                        plan: c3-small-x86
                        worker_plan: c3-medium-x86
                        control_plane_count: 1
                        worker_count: 1
                        control_plane:
                          ready: true
                          replicas: 1
                          ready_replicas: 1
                        workers:
                          replicas: 1
                          ready_replicas: 1
                          available_replicas: 1
                        worker_status: ready
                        control_plane_status: ready
                        infrastructure_ready: true
                        control_plane_ready: true
                        message: Cluster is ready
                        steps:
                          - name: infrastructure
                            status: completed
                          - name: control_plane
                            status: completed
                          - name: workers
                            status: completed
                        last_status_change: '2026-01-15T10:35:00Z'
                        failure_message: null
                        failure_reason: null
                        nodes:
                          - id: my-cluster-control-plane-abc12
                            name: my-cluster-control-plane-abc12
                            hostname: my-cluster-control-plane-abc12
                            server_id: sv_RLYV8DZ2D5QoE
                            type: control_plane
                            status: ready
                            ip: 203.0.113.10
                            internal_ip: 10.0.0.10
                            external_ip: 203.0.113.10
                          - id: my-cluster-md-0-def34
                            name: my-cluster-md-0-def34
                            hostname: my-cluster-md-0-def34
                            server_id: sv_7KP2Xm9nYwR3Q
                            type: worker
                            status: ready
                            ip: 203.0.113.20
                            internal_ip: 10.0.0.20
                            external_ip: 203.0.113.20
                        project:
                          id: proj_6059EqYkOQj8p
                          name: My Project
                          slug: my-project
                Provisioning:
                  value:
                    data:
                      type: kubernetes_clusters
                      id: kc_pRMLydp0dQKr1
                      attributes:
                        name: my-cluster
                        phase: Provisioning
                        ready: false
                        control_plane_endpoint: null
                        kubeconfig_url: null
                        location: SAN3
                        load_balancer_ips: []
                        kubernetes_version: v1.34.3+rke2r1
                        version_status: up_to_date
                        available_upgrade: null
                        created_at: '2026-01-15T10:30:00Z'
                        plan: c3-small-x86
                        worker_plan: c3-medium-x86
                        control_plane_count: 1
                        worker_count: 0
                        control_plane:
                          ready: false
                          replicas: 1
                          ready_replicas: 0
                        workers: null
                        worker_status: null
                        control_plane_status: scaling
                        infrastructure_ready: false
                        control_plane_ready: false
                        message: Setting up cluster infrastructure
                        steps:
                          - name: infrastructure
                            status: in_progress
                          - name: control_plane
                            status: pending
                          - name: workers
                            status: pending
                        last_status_change: '2026-01-15T10:32:00Z'
                        failure_message: null
                        failure_reason: null
                        nodes:
                          - id: my-cluster-control-plane-xyz78
                            name: my-cluster-control-plane-xyz78
                            hostname: null
                            server_id: null
                            type: control_plane
                            status: pending
                            ip: null
                            internal_ip: null
                            external_ip: null
                        project:
                          id: proj_6059EqYkOQj8p
                          name: My Project
                          slug: my-project
              schema:
                $ref: '#/components/schemas/kubernetes_cluster'
        '401':
          description: Unauthorized
          content:
            application/vnd.api+json:
              examples:
                InvalidToken:
                  value:
                    errors:
                      - code: UNAUTHORIZED
                        message: Invalid token
              schema:
                $ref: '#/components/schemas/error_object'
        '404':
          description: Not Found
          content:
            application/vnd.api+json:
              examples:
                ClusterNotFound:
                  value:
                    errors:
                      - code: NOT_FOUND
                        message: Cluster my-cluster not found
              schema:
                $ref: '#/components/schemas/error_object'
      security:
        - Bearer: []
      x-codeSamples:
        - lang: python
          label: Python (SDK)
          source: |-
            from latitudesh_python_sdk import Latitudesh
            import os


            with Latitudesh(
                bearer=os.getenv("LATITUDESH_BEARER", ""),
            ) as latitudesh:

                res = latitudesh.kubernetes_clusters.get_kubernetes_cluster(kubernetes_cluster_id="<id>")

                # Handle response
                print(res)
        - lang: go
          label: Go (SDK)
          source: "package main\n\nimport(\n\t\"context\"\n\t\"os\"\n\tlatitudeshgosdk \"github.com/latitudesh/latitudesh-go-sdk\"\n\t\"log\"\n)\n\nfunc main() {\n    ctx := context.Background()\n\n    s := latitudeshgosdk.New(\n        latitudeshgosdk.WithSecurity(os.Getenv(\"LATITUDESH_BEARER\")),\n    )\n\n    res, err := s.KubernetesClusters.GetKubernetesCluster(ctx, \"<id>\")\n    if err != nil {\n        log.Fatal(err)\n    }\n    if res.KubernetesCluster != nil {\n        // handle response\n    }\n}"
        - lang: typescript
          label: Typescript (SDK)
          source: |-
            import { Latitudesh } from "latitudesh-typescript-sdk";

            const latitudesh = new Latitudesh({
              bearer: process.env["LATITUDESH_BEARER"] ?? "",
            });

            async function run() {
              const result = await latitudesh.kubernetesClusters.getKubernetesCluster({
                kubernetesClusterId: "<id>",
              });

              console.log(result);
            }

            run();
components:
  schemas:
    kubernetes_cluster:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/kubernetes_cluster_data'
    error_object:
      type: object
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
                nullable: true
              status:
                type: string
              title:
                type: string
              detail:
                type: string
              source:
                type: object
                properties:
                  pointer:
                    type: string
                  parameter:
                    type: string
              meta:
                type: object
    kubernetes_cluster_data:
      type: object
      properties:
        id:
          type: string
          description: The cluster ID in hashed format (kc_<hash>)
        type:
          type: string
        attributes:
          type: object
          properties:
            name:
              type: string
              description: The cluster name
            phase:
              type: string
              description: The current phase of the cluster lifecycle
              enum:
                - Pending
                - Provisioning
                - Provisioned
                - Deleting
                - Failed
            ready:
              type: boolean
              description: Whether the cluster is ready to accept workloads
            control_plane_endpoint:
              type: string
              nullable: true
              description: The URL endpoint for the Kubernetes API server
            kubeconfig_url:
              type: string
              nullable: true
              description: The URL to retrieve the kubeconfig file
            location:
              type: string
              description: The site/region where the cluster is deployed
            load_balancer_ips:
              type: array
              description: IP addresses assigned to the cluster's load balancer
              items:
                type: string
            kubernetes_version:
              type: string
              description: The Kubernetes version running on the cluster
            version_status:
              type: string
              description: The cluster's version status relative to available upgrades
              enum:
                - up_to_date
                - upgrade_available
                - unsupported
                - unknown
            available_upgrade:
              type: string
              nullable: true
              description: >-
                The next available Kubernetes version for upgrade. Null if the
                cluster is already on the latest version, or if version status
                is unknown or unsupported.
            created_at:
              type: string
              format: date-time
              description: When the cluster was created
            plan:
              type: string
              description: The machine plan slug for control plane nodes
            worker_plan:
              type: string
              nullable: true
              description: >-
                The machine plan slug for worker nodes. Null if no workers
                exist.
            control_plane_count:
              type: integer
              description: Number of control plane node replicas
            worker_count:
              type: integer
              description: Number of worker node replicas. Returns 0 if no workers exist.
            control_plane:
              type: object
              nullable: true
              description: Control plane status information
              properties:
                ready:
                  type: boolean
                replicas:
                  type: integer
                ready_replicas:
                  type: integer
            workers:
              type: object
              nullable: true
              description: Worker nodes status information
              properties:
                replicas:
                  type: integer
                ready_replicas:
                  type: integer
                available_replicas:
                  type: integer
            worker_status:
              type: string
              nullable: true
              description: >-
                Current status of worker nodes. 'idle' when 0 workers, 'ready'
                when all workers are ready, 'scaling' when workers are being
                provisioned/removed, 'error' when a worker has failed.
              enum:
                - idle
                - ready
                - scaling
                - error
            control_plane_status:
              type: string
              description: >-
                Current status of control plane nodes. 'ready' when control
                plane is operational, 'scaling' when nodes are being
                provisioned/removed, 'error' when a control plane node has
                failed.
              enum:
                - ready
                - scaling
                - error
            infrastructure_ready:
              type: boolean
              description: Whether the underlying infrastructure is ready
            control_plane_ready:
              type: boolean
              description: Whether the control plane is ready
            message:
              type: string
              description: >-
                Human-readable status message describing the current
                provisioning state
            steps:
              type: array
              description: Provisioning progress steps for dashboard display
              items:
                type: object
                properties:
                  name:
                    type: string
                    description: Step identifier
                    enum:
                      - infrastructure
                      - control_plane
                      - workers
                  status:
                    type: string
                    description: Current status of this step
                    enum:
                      - pending
                      - in_progress
                      - completed
            last_status_change:
              type: string
              format: date-time
              nullable: true
              description: Timestamp of the most recent status condition change
            failure_message:
              type: string
              nullable: true
              description: Error message if the cluster has failed
            failure_reason:
              type: string
              nullable: true
              description: Reason code for cluster failure
            nodes:
              type: array
              description: List of nodes (servers) in the cluster
              items:
                type: object
                properties:
                  id:
                    type: string
                    description: Unique identifier for the node (machine name)
                  name:
                    type: string
                    description: Name of the node
                  hostname:
                    type: string
                    nullable: true
                    description: Hostname of the node
                  server_id:
                    type: string
                    nullable: true
                    description: The Latitude server ID associated with this node
                  type:
                    type: string
                    description: The role of this node in the cluster
                    enum:
                      - control_plane
                      - worker
                  status:
                    type: string
                    description: Current status of the node
                    enum:
                      - ready
                      - pending
                      - failed
                      - deleting
                  ip:
                    type: string
                    nullable: true
                    description: >-
                      Primary IP address (external if available, otherwise
                      internal)
                  internal_ip:
                    type: string
                    nullable: true
                    description: Internal/private IP address
                  external_ip:
                    type: string
                    nullable: true
                    description: External/public IP address
            project:
              type: object
              description: The project this cluster belongs to
              properties:
                id:
                  type: string
                  description: The project ID
                name:
                  type: string
                  description: The project name
                slug:
                  type: string
                  description: The project slug
  securitySchemes:
    Bearer:
      type: apiKey
      name: Authorization
      in: header

````