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

# List Kubernetes Clusters

> Lists all Kubernetes clusters for a project.




## OpenAPI

````yaml https://spec.speakeasy.com/latitude/latitude/latitude-sh-api-with-code-samples get /kubernetes_clusters
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:
    get:
      tags:
        - Kubernetes Clusters
      summary: List Kubernetes Clusters
      description: |
        Lists all Kubernetes clusters for a project.
      operationId: list-kubernetes-clusters
      parameters:
        - name: project_id
          in: query
          required: true
          description: The project ID to filter clusters by
          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
                          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'
                          created_at: '2026-01-15T10:30:00Z'
                EmptyList:
                  value:
                    data: []
              schema:
                $ref: '#/components/schemas/kubernetes_clusters'
        '400':
          description: Bad Request
          content:
            application/vnd.api+json:
              examples:
                MissingProjectId:
                  value:
                    errors:
                      - code: VALIDATION_ERROR
                        message: project_id query param is required
              schema:
                $ref: '#/components/schemas/error_object'
        '401':
          description: Unauthorized
          content:
            application/vnd.api+json:
              examples:
                InvalidToken:
                  value:
                    errors:
                      - code: UNAUTHORIZED
                        message: Invalid token
              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.list_kubernetes_clusters(project_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.ListKubernetesClusters(ctx, \"<id>\")\n    if err != nil {\n        log.Fatal(err)\n    }\n    if res.KubernetesClusters != 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.listKubernetesClusters({
                projectId: "<id>",
              });

              console.log(result);
            }

            run();
components:
  schemas:
    kubernetes_clusters:
      type: object
      description: Response schema for listing clusters (uses summary representation)
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/kubernetes_cluster_summary_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_summary_data:
      type: object
      description: Summary representation of a cluster (used in list responses)
      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
            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
            created_at:
              type: string
              format: date-time
              description: When the cluster was created
  securitySchemes:
    Bearer:
      type: apiKey
      name: Authorization
      in: header

````