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

# Upgrade Kubernetes version



## OpenAPI

````yaml https://platform.ankra.app/openapi.json post /api/v1/clusters/digitalocean/{cluster_id}/upgrade-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}/upgrade-k8s-version:
    post:
      tags:
        - DigitalOcean Cluster API
      summary: Upgrade Kubernetes version
      operationId: >-
        upgrade_digitalocean_k8s_version_endpoint_api_v1_clusters_digitalocean__cluster_id__upgrade_k8s_version_post
      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
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpgradeK8sVersionRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpgradeK8sVersionResult'
          description: Kubernetes version upgrade initiated
        '401':
          description: Unauthorized
        '404':
          description: Not found
        '409':
          description: Cluster not in a valid state for upgrade
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
components:
  schemas:
    UpgradeK8sVersionRequest:
      properties:
        force:
          default: false
          title: Force
          type: boolean
        target_version:
          title: Target Version
          type: string
      required:
        - target_version
      title: UpgradeK8sVersionRequest
      type: object
    UpgradeK8sVersionResult:
      properties:
        new_version:
          title: New Version
          type: string
        nodes_affected:
          title: Nodes Affected
          type: integer
        operation_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Operation Id
        previous_version:
          anyOf:
            - type: string
            - type: 'null'
          title: Previous Version
      required:
        - previous_version
        - new_version
        - nodes_affected
      title: UpgradeK8sVersionResult
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      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

````