---
title: "Create Deployment With Cluster"
method: POST
path: "/api/v1/deployments/with-cluster"
tags: ["deployments"]
---

# Create Deployment With Cluster

`POST /api/v1/deployments/with-cluster`

## Request

- Base URL: `https://api.mengi.cloud` (the document declares no server; this is the origin it was published from)
- URL: `https://api.mengi.cloud/api/v1/deployments/with-cluster`
- Auth: none declared

Create a new cluster and deployment in one transaction.

## Request body

- ClusterAndDeploymentCreate: Combined request for creating a cluster and deployment together.
  - `cluster_name` string, required
  - `provider` string, required
  - `region` string, required
  - `tier` 'shared' | 'dedicated' | 'production'
  - `server_type` string, nullable
  - `deployment_name` string, required
  - `app_type` string
  - `config` object, nullable
  - `cpu_request` number, nullable
  - `memory_request_mb` integer, nullable
  - `replicas` integer, nullable
  - `container_port` integer, nullable
  - `environment_variables` unknown[], nullable
    - unknown
  - `storage_size_gb` integer, nullable
  - `volumes` VolumeConfig[], nullable
    - `path` string, required
    - `sizeGb` integer
    - `purpose` string, nullable
  - `run_as_uid` integer, nullable
  - `docker_image` string, nullable
  - `deployment_type` string
  - `helm_repo_url` string, nullable
  - `helm_chart_name` string, nullable
  - `helm_chart_version` string, nullable
  - `custom_values_yaml` string, nullable
  - `image_update_strategy` string, nullable
  - `image_update_constraint` string, nullable
  - `image_allow_tags` string, nullable
  - `image_ignore_tags` string, nullable
  - `helm_ingress_values` boolean, nullable

## Response `201`

Successful Response

- DeploymentResponse
  - `id` string, uuid, required
  - `user_id` string, uuid, required
  - `organization_id` string, uuid, nullable
  - `cluster_id` string, uuid, required
  - `name` string, required
  - `app_type` 'web_app' | 'api' | 'database' | 'static_site' | 'container' | 'helm', required
  - `status` 'pending' | 'provisioning' | 'promoting' | 'running' | 'stopped' | 'failed' | 'error' | 'migrating' | 'deleting', required
  - `config` object, nullable
  - `values_yaml` string, nullable
  - `git_path` string, nullable
  - `endpoint_url` string, nullable
  - `error_message` string, nullable
  - `cpu_request` number, nullable
  - `memory_request_mb` integer, nullable
  - `replicas` integer, nullable
  - `container_port` integer, nullable
  - `storage_size_gb` integer, nullable
  - `command` string[], nullable
  - `args` string[], nullable
  - `deployment_type` string, nullable
  - `helm_repo_url` string, nullable
  - `helm_chart_name` string, nullable
  - `helm_chart_version` string, nullable
  - `custom_values_yaml` string, nullable
  - `image_update_strategy` string, nullable
  - `image_update_constraint` string, nullable
  - `image_allow_tags` string, nullable
  - `image_ignore_tags` string, nullable
  - `is_adopted` boolean
  - `source_namespace` string, nullable
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required
  - `provider` string, nullable
  - `region` string, nullable
  - `cluster_status` string, nullable
  - `cluster_error` string, nullable

## Other responses

- `422`: Validation Error

## Changes

- **2026-10-20** `4ae9b375cdbb`: 1 info
  - added the new optional request property `helm_ingress_values`

[Operation history](https://skmtc.dev/mengi/apis/mengi-cloud/changes/api/v1/deployments/with-cluster/post.md)

---

[API](https://skmtc.dev/mengi/apis/mengi-cloud.md) · [All operations](https://skmtc.dev/mengi/apis/mengi-cloud/llms.txt) · [OpenAPI document](https://skmtc.dev/mengi/apis/mengi-cloud/revisions/4ae9b375cdbb?raw)
