---
title: "Create Cluster"
method: POST
path: "/ske/v2alpha1/thr1-standard/workspaces/{workspaceUUID}/sotoonclusters"
tags: ["Sotoon Kubernetes Engine"]
---

# Create Cluster

`POST /ske/v2alpha1/thr1-standard/workspaces/{workspaceUUID}/sotoonclusters`

Creates a new Kubernetes cluster in the specified workspace

## Path parameters

- `workspaceUUID` string, required

## Request body

- ContainerSotoonCluster
  - `apiVersion` 'ske.sotoon.ir/v1alpha1', required — Version identifier of the API schema
  - `kind` 'SotoonCluster', required — The string value 'SotoonCluster' that identifies the schema
  - `metadata` ContainerObjectMeta, required — Standard resource metadata fields
    - `annotations` object, required — Annotations store additional metadata about the resource
    - `creationTimestamp` string, date-time, required
    - `deletionTimestamp` string, date-time, required
    - `labels` object, required — Labels are key-value pairs attached to resources for organization and categorization
    - `name` string, required — User-provided name that uniquely identifies the resource within its workspace
    - `resourceVersion` string — Internal version for optimistic concurrency control
    - `uid` string, required — System-generated unique identifier for the resource
    - `workspace` string, required — Unique identifier of the workspace where the resource belongs
  - `spec` ContainerSotoonClusterSpec, required — Desired configuration for the Kubernetes cluster
    - `clusterNetwork` ContainerClusterNetwork, nullable — Network configuration for the cluster
      - `pods` ContainerNetworkRanges, nullable — Network ranges from which Pod networks are allocated
        - `cidrBlocks` string[], required — List of CIDR blocks
      - `services` ContainerNetworkRanges, nullable — Network ranges from which Pod networks are allocated
        - `cidrBlocks` string[], required — List of CIDR blocks
    - `infra` ContainerClusterInfrastructureSpec, required — Infrastructure configuration for the cluster
      - `VPC` string, required — Virtual Private Cloud Network that the cluster is created in
      - `subnet` string, required — Engine sub-network that the cluster is created in
      - `version` ContainerSKEVersion, required — Control-plane version configuration
        - `kubernetesVersion` string, required — Kubernetes version
        - `patchVersion` string, required — SKE patch version
  - `status` ContainerSotoonClusterStatus, required — Current observed state of the cluster
    - `conditions` V1Condition[] — Current conditions of the cluster
      - `lastTransitionTime` string, date-time, required
      - `message` string, required
      - `observedGeneration` integer
      - `reason` string, required
      - `status` string, required
      - `type` string, required
    - `kubeconfigSecretName` ContainerLocalObjectRef, nullable — Reference to the kubeconfig secret
      - `name` string, required — Name of the referenced object
    - `phase` 'Provisioned' | 'Provisioning' | 'Initialized' | 'Ready' | 'Failed' | 'Upgrading' | 'Deleting' | 'HighlyAvailable' | 'Unknown', required — Current phase of the cluster
    - `ready` boolean, required — Indicates if the cluster is ready for use
    - `readyReplicas` integer, required — Number of ready replicas
    - `replicas` integer, required — Total number of replicas
    - `unavailableReplicas` integer, required — Number of unavailable replicas
    - `updatedReplicas` integer, required — Number of updated replicas

## Response `201`

The cluster was successfully created and is being provisioned. The request must include 
cluster specifications like version and networking details. The response contains the 
complete cluster details including the assigned unique identifier.

- ContainerSotoonCluster
  - `apiVersion` 'ske.sotoon.ir/v1alpha1', required — Version identifier of the API schema
  - `kind` 'SotoonCluster', required — The string value 'SotoonCluster' that identifies the schema
  - `metadata` ContainerObjectMeta, required — Standard resource metadata fields
    - `annotations` object, required — Annotations store additional metadata about the resource
    - `creationTimestamp` string, date-time, required
    - `deletionTimestamp` string, date-time, required
    - `labels` object, required — Labels are key-value pairs attached to resources for organization and categorization
    - `name` string, required — User-provided name that uniquely identifies the resource within its workspace
    - `resourceVersion` string — Internal version for optimistic concurrency control
    - `uid` string, required — System-generated unique identifier for the resource
    - `workspace` string, required — Unique identifier of the workspace where the resource belongs
  - `spec` ContainerSotoonClusterSpec, required — Desired configuration for the Kubernetes cluster
    - `clusterNetwork` ContainerClusterNetwork, nullable — Network configuration for the cluster
      - `pods` ContainerNetworkRanges, nullable — Network ranges from which Pod networks are allocated
        - `cidrBlocks` string[], required — List of CIDR blocks
      - `services` ContainerNetworkRanges, nullable — Network ranges from which Pod networks are allocated
        - `cidrBlocks` string[], required — List of CIDR blocks
    - `infra` ContainerClusterInfrastructureSpec, required — Infrastructure configuration for the cluster
      - `VPC` string, required — Virtual Private Cloud Network that the cluster is created in
      - `subnet` string, required — Engine sub-network that the cluster is created in
      - `version` ContainerSKEVersion, required — Control-plane version configuration
        - `kubernetesVersion` string, required — Kubernetes version
        - `patchVersion` string, required — SKE patch version
  - `status` ContainerSotoonClusterStatus, required — Current observed state of the cluster
    - `conditions` V1Condition[] — Current conditions of the cluster
      - `lastTransitionTime` string, date-time, required
      - `message` string, required
      - `observedGeneration` integer
      - `reason` string, required
      - `status` string, required
      - `type` string, required
    - `kubeconfigSecretName` ContainerLocalObjectRef, nullable — Reference to the kubeconfig secret
      - `name` string, required — Name of the referenced object
    - `phase` 'Provisioned' | 'Provisioning' | 'Initialized' | 'Ready' | 'Failed' | 'Upgrading' | 'Deleting' | 'HighlyAvailable' | 'Unknown', required — Current phase of the cluster
    - `ready` boolean, required — Indicates if the cluster is ready for use
    - `readyReplicas` integer, required — Number of ready replicas
    - `replicas` integer, required — Total number of replicas
    - `unavailableReplicas` integer, required — Number of unavailable replicas
    - `updatedReplicas` integer, required — Number of updated replicas

## Other responses

- `400` — Bad request - invalid configuration
- `401` — Unauthorized - invalid or expired authentication token
- `403` — Forbidden - insufficient permissions for workspace operations
- `404` — Not found - workspace or resource does not exist
- `409` — Conflict - cluster with the same name already exists
- `422` — Unprocessable entity - resource constraints or quota exceeded

---

[API](https://skmtc.dev/sotoon/apis/sotoon-api.md) · [All operations](https://skmtc.dev/sotoon/apis/sotoon-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/sotoon/sotoon-api/revisions/c937cd9861c5/schema)
