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

# Get current Kubernetes version



## OpenAPI

````yaml https://platform.ankra.app/openapi.json get /api/v1/clusters/digitalocean/{cluster_id}/k8s-version
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://platform.ankra.app
security: []
paths:
  /api/v1/clusters/digitalocean/{cluster_id}/k8s-version:
    get:
      tags:
        - DigitalOcean Cluster API
      summary: Get current Kubernetes version
      operationId: >-
        get_digitalocean_k8s_version_endpoint_api_v1_clusters_digitalocean__cluster_id__k8s_version_get
      parameters:
        - in: path
          name: cluster_id
          required: true
          schema:
            format: uuid
            title: Cluster Id
            type: string
        - in: header
          name: authorization
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
        - in: header
          name: x-ankra-organisation-id
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Ankra-Organisation-Id
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/K8sVersionInfo'
          description: Kubernetes version retrieved successfully
        '401':
          description: Unauthorized
        '404':
          description: Not found
        '409':
          description: Cluster is not a DigitalOcean cluster
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
components:
  schemas:
    K8sVersionInfo:
      properties:
        current_version:
          anyOf:
            - type: string
            - type: 'null'
          title: Current Version
        desired_version:
          anyOf:
            - type: string
            - type: 'null'
          title: Desired Version
        distribution:
          title: Distribution
          type: string
        nodes:
          items:
            $ref: '#/components/schemas/K8sNodeVersion'
          title: Nodes
          type: array
        observed_version:
          anyOf:
            - type: string
            - type: 'null'
          title: Observed Version
        version_drift:
          default: false
          title: Version Drift
          type: boolean
      required:
        - current_version
        - distribution
      title: K8sVersionInfo
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    K8sNodeVersion:
      properties:
        desired_version:
          anyOf:
            - type: string
            - type: 'null'
          title: Desired Version
        name:
          title: Name
          type: string
        observed_version:
          anyOf:
            - type: string
            - type: 'null'
          title: Observed Version
        role:
          title: Role
          type: string
        state:
          title: State
          type: string
      required:
        - name
        - role
        - state
      title: K8sNodeVersion
      type: object
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object

````