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

# Preflight a managed cluster

> Browser session authentication; RBAC permission `clusters.create`. For Kapsule, provider_cluster_id is the opaque region-qualified `regions/{region}/clusters/{id}` reference. CNI is immutable. Imported/unknown provenance is disconnect-only; provider deletion is allowed by default only for created clusters.



## OpenAPI

````yaml https://platform.ankra.app/openapi.json post /org/clusters/managed/{provider}/preflight
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://platform.ankra.app
security: []
paths:
  /org/clusters/managed/{provider}/preflight:
    post:
      tags:
        - Scaleway / Kapsule
      summary: Preflight a managed cluster
      description: >-
        Browser session authentication; RBAC permission `clusters.create`. For
        Kapsule, provider_cluster_id is the opaque region-qualified
        `regions/{region}/clusters/{id}` reference. CNI is immutable.
        Imported/unknown provenance is disconnect-only; provider deletion is
        allowed by default only for created clusters.
      operationId: managed_preflight_browser
      parameters:
        - in: path
          name: provider
          required: true
          schema:
            $ref: '#/components/schemas/ManagedProvider'
        - description: Must match the ankra_csrf browser cookie.
          in: header
          name: X-Ankra-CSRF
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateManagedClusterRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedPreflightResponse'
          description: Successful response
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContractDetailError'
          description: Invalid request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContractDetailError'
          description: Unauthenticated
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContractDetailError'
          description: Permission or CSRF check failed
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContractDetailError'
          description: Resource not found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContractDetailError'
          description: Conflicting or unsafe lifecycle state
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Request validation failed
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContractDetailError'
          description: Provider or internal failure
      security:
        - SessionCookie: []
components:
  schemas:
    ManagedProvider:
      enum:
        - doks
        - uks
        - gke
        - ovh_mks
        - aks
        - eks
        - kapsule
      example: kapsule
      type: string
    CreateManagedClusterRequest:
      example:
        cni: cilium
        credential_id: 11111111-2222-4333-8444-555555555555
        kapsule:
          private_endpoint: true
          private_network_id: pn-1
        kubernetes_version: '1.31'
        location: fr-par
        name: kapsule-prod
        node_pools:
          - autohealing: true
            count: 3
            name: default
            public_ip: false
            root_volume_type: sbs-5k
            size: DEV1-M
            zone: fr-par-1
      properties:
        cluster_plan:
          anyOf:
            - type: string
            - type: 'null'
        cni:
          anyOf:
            - enum:
                - cilium
                - cilium_native
                - calico
              type: string
            - type: 'null'
        credential_id:
          format: uuid
          type: string
        description:
          anyOf:
            - type: string
            - type: 'null'
        gitops_branch:
          default: master
          type: string
        gitops_credential_name:
          anyOf:
            - type: string
            - type: 'null'
        gitops_repository:
          anyOf:
            - type: string
            - type: 'null'
        ha:
          anyOf:
            - type: boolean
            - type: 'null'
        kapsule:
          anyOf:
            - $ref: '#/components/schemas/KapsuleClusterOptions'
            - type: 'null'
        kubernetes_version:
          anyOf:
            - type: string
            - type: 'null'
        location:
          type: string
        name:
          type: string
        node_pools:
          items:
            $ref: '#/components/schemas/ManagedNodePoolRequest'
          minItems: 1
          type: array
      required:
        - name
        - credential_id
        - location
        - node_pools
      type: object
    ManagedPreflightResponse:
      properties:
        can_proceed:
          type: boolean
        items:
          items:
            properties:
              check:
                type: string
              message:
                type: string
              status:
                type: string
            required:
              - check
              - status
              - message
            type: object
          type: array
      required:
        - items
        - can_proceed
      type: object
    ContractDetailError:
      example:
        detail: Cluster not found
      properties:
        detail:
          oneOf:
            - type: string
            - additionalProperties: true
              properties: {}
              type: object
      required:
        - detail
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    KapsuleClusterOptions:
      properties:
        private_endpoint:
          anyOf:
            - type: boolean
            - type: 'null'
        private_network_id:
          type: string
      required:
        - private_network_id
      type: object
    ManagedNodePoolRequest:
      properties:
        autohealing:
          anyOf:
            - type: boolean
            - type: 'null'
        autoscaling:
          anyOf:
            - $ref: '#/components/schemas/ManagedAutoscaling'
            - type: 'null'
        count:
          default: 1
          minimum: 1
          type: integer
        labels:
          additionalProperties:
            type: string
          type: object
        name:
          type: string
        provider_id:
          anyOf:
            - type: string
            - type: 'null'
        public_ip:
          anyOf:
            - type: boolean
            - type: 'null'
        root_volume_size_gb:
          anyOf:
            - minimum: 1
              type: integer
            - type: 'null'
        root_volume_type:
          anyOf:
            - type: string
            - type: 'null'
        security_group_id:
          anyOf:
            - type: string
            - type: 'null'
        size:
          type: string
        status:
          anyOf:
            - type: string
            - type: 'null'
        taints:
          items:
            $ref: '#/components/schemas/ScalewayNodeTaint'
          type: array
        upgrade_policy:
          anyOf:
            - type: string
            - type: 'null'
        zone:
          anyOf:
            - type: string
            - type: 'null'
      required:
        - name
        - size
      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
    ManagedAutoscaling:
      properties:
        enabled:
          default: true
          type: boolean
        max_count:
          minimum: 1
          type: integer
        min_count:
          minimum: 1
          type: integer
      required:
        - min_count
        - max_count
      type: object
    ScalewayNodeTaint:
      properties:
        effect:
          enum:
            - NoSchedule
            - PreferNoSchedule
            - NoExecute
          type: string
        key:
          type: string
        value:
          default: ''
          type: string
      required:
        - key
        - effect
      type: object
  securitySchemes:
    SessionCookie:
      description: Browser session. Mutations also require X-Ankra-CSRF.
      in: cookie
      name: ankra_session
      type: apiKey

````