---
title: "Creates a Kubernetes cluster in the project and returns the async operation."
method: POST
path: "/projects/{project_id}/kubernetes/clusters"
tags: ["Kubernetes Clusters"]
---

# Creates a Kubernetes cluster in the project and returns the async operation.

`POST /projects/{project_id}/kubernetes/clusters`

## Path parameters

- `project_id` string, required

## Request body

- KubernetesClusterPostRequest
  - `add_ons` string[] — List of add-ons to include in the new cluster.
  - `apiserver_extra_args` object — Extra arguments to pass to the kube-apiserver control plane component.
  - `auth_config` KubernetesClusterAuthConfig — This configures how users authenticate to the Kubernetes API server. example: {"oidc": {"issuer_url": "https://oauth2.example.com", "client_id": "kubernetes"}}
    - `oidc` OIDCAuthConfig — This allows the Kubernetes API server to authenticate users via an external OIDC provider.
      - `ca_cert` string — PEM-encoded certificate authority certificate used to validate the OIDC server's certificate.
      - `client_id` string — Client ID for the OpenID Connect client.
      - `groups_claim` string — Claim used to identify the user's groups.
      - `issuer_url` string — URL of the OpenID Connect issuer.
      - `username_claim` string — Claim used to identify the user. Defaults to 'sub'.
      - `username_prefix` string — Prefix added before the username to avoid name conflicts.
  - `cluster_cidr` string — Range of IP addresses allocated to pods scheduled on worker nodes, in CIDR notation.
  - `configuration` 'ha' — Configuration setting is deprecated, defaults to HA configuration.
  - `controller_manager_extra_args` object — Extra arguments to pass to the kube-controller-manager control plane component.
  - `kubelogin_args` object — Arguments for the kubectl oidc-login plugin.
  - `location` string, required — Location to create the Kubernetes cluster in.
  - `name` string, required — Name of the Kubernetes cluster.
  - `node_cidr_mask_size` integer — Mask size for the cluster CIDR.
  - `private` boolean — Whether the cluster is private (without a public IP). Defaults to false.
  - `scheduler_extra_args` object — Extra arguments to pass to the kube-scheduler control plane component.
  - `service_cluster_ip_range` string — Range of IP addresses allocated to Kubernetes services, in CIDR notation.
  - `subnet_id` string — ID of the subnet to create the cluster in. Must be in the location specified. If not provided, the default subnet for the location is used, if there is one.
  - `version` string, required — Version of the Crusoe Kubernetes image to create the cluster with.

## Response `200`

- AsyncOperationResponse
  - `operation` Operation, required — Individual resources that use Operations should populate the `metadata` field with resource-specific information.
    - `completed_at` string, required
    - `metadata` string, required
    - `operation_id` string, required
    - `result` string
    - `started_at` string, required
    - `state` 'IN_PROGRESS' | 'SUCCEEDED' | 'FAILED', required

## Other responses

- `400` — Error Bad Request
- `401` — Error Authentication Failed
- `403` — Error Permissions
- `500` — Error Internal Server

---

[API](https://skmtc.net/crusoecloud/apis/crusoe-cloud-api-gateway.md) · [All operations](https://skmtc.net/crusoecloud/apis/crusoe-cloud-api-gateway/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/crusoecloud/crusoe-cloud-api-gateway/versions/a3fd2dedc72b/schema)
