---
title: "create a cluster"
method: POST
path: "/clusters/"
tags: ["cluster"]
---

# create a cluster

`POST /clusters/`

create a cluster

## Request body

- ClusterCreateClusterReq
  - `clusterName` string, required
  - `clusterType` string, required
  - `clusterVersion` string, required
  - `copies` integer — The number of copies of the newly created cluster data, consistent with the number of copies set in PD
  - `cpuArchitecture` string, required — X86/X86_64/ARM
  - `dbPassword` string, required
  - `dbUser` string — todo delete?
  - `exclusive` boolean — Whether the newly created cluster is exclusive to physical resources, when exclusive, a host will only deploy instances of the same cluster, which may result in poor resource utilization
  - `parameterGroupID` string
  - `region` string, required — The Region where the cluster is located
  - `resourceParameters` StructsClusterResourceInfo
    - `instanceResource` StructsClusterResourceParameterCompute[]
      - `componentType` string — TiDB/TiKV/PD/TiFlash/CDC/DM-Master/DM-Worker
      - `resource` StructsClusterResourceParameterComputeResource[]
        - `count` integer
        - `diskCapacity` integer
        - `diskId` string
        - `diskType` string — NVMeSSD/SSD/SATA
        - `hostIp` string
        - `specCode` string — 4C8G/8C16G ?
        - `zoneCode` string
      - `totalNodeCount` integer
    - `requestResourceMode` 'SpecificZone' | 'SpecificHost'
  - `tags` string[]
  - `tls` boolean
  - `vendor` string

## Response `200`

OK

- object
  - `code` integer
  - `data` object
    - `clusterId` string
    - `workFlowId` string — Asynchronous task workflow ID
  - `message` string

## Other responses

- `401` — Unauthorized
- `403` — Forbidden
- `500` — Internal Server Error

---

[API](https://skmtc.net/pingcap/apis/em-ui-api.md) · [All operations](https://skmtc.net/pingcap/apis/em-ui-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/pingcap/em-ui-api/versions/631e4b26b7e8/schema)
