Skip to content

Create Deployment With Cluster

POST
/deployments/with-cluster
curl --request POST \
--url https://api.mengi.cloud/deployments/with-cluster \
--header 'Content-Type: application/json' \
--data '{ "cluster_name": "example", "provider": "example", "region": "example", "tier": "shared", "server_type": "example", "deployment_name": "example", "app_type": "helm", "config": {}, "cpu_request": 0.5, "memory_request_mb": 512, "replicas": 1, "container_port": 8080, "environment_variables": [ "example" ], "storage_size_gb": 1, "volumes": [ { "path": "example", "sizeGb": 10, "purpose": "example" } ], "run_as_uid": 1, "docker_image": "example", "deployment_type": "docker", "helm_repo_url": "example", "helm_chart_name": "example", "helm_chart_version": "example", "custom_values_yaml": "example", "image_update_strategy": "example", "image_update_constraint": "example", "image_allow_tags": "example", "image_ignore_tags": "example", "helm_ingress_values": true, "https_redirect": true }'

Create a new cluster and deployment in one transaction.

Media typeapplication/json
ClusterAndDeploymentCreate

Combined request for creating a cluster and deployment together.

object
cluster_name
required
Cluster Name
string
provider
required
Provider
string
region
required
Region
string
tier
ClusterTier
string
default: dedicated
Allowed values: shared dedicated production
server_type
Server Type
Any of:
string
deployment_name
required
Deployment Name
string
app_type
App Type
string
default: helm
config
Config
Any of:
object
key
additional properties
any
cpu_request
Cpu Request
Any of:
number
memory_request_mb
Memory Request Mb
Any of:
integer
replicas
Replicas
Any of:
integer
container_port
Container Port
Any of:
integer
environment_variables
Environment Variables
Any of:
Array
storage_size_gb
Storage Size Gb
Any of:
integer
volumes
Volumes
Any of:
Array<object>
VolumeConfig

Volume configuration for persistent storage.

object
path
required
Path
string
sizeGb
Sizegb
integer
default: 10
purpose
Purpose
Any of:
string
run_as_uid
Run As Uid
Any of:
integer
docker_image
Docker Image
Any of:
string
deployment_type
Deployment Type
string
default: docker
helm_repo_url
Helm Repo Url
Any of:
string
helm_chart_name
Helm Chart Name
Any of:
string
helm_chart_version
Helm Chart Version
Any of:
string
custom_values_yaml
Custom Values Yaml
Any of:
string
image_update_strategy
Image Update Strategy
Any of:
string
image_update_constraint
Image Update Constraint
Any of:
string
image_allow_tags
Image Allow Tags
Any of:
string
image_ignore_tags
Image Ignore Tags
Any of:
string
helm_ingress_values
Helm Ingress Values
Any of:
boolean
https_redirect
Https Redirect
Any of:
boolean

Successful Response

Media typeapplication/json
DeploymentResponse
object
id
required
Id
string format: uuid
user_id
required
User Id
string format: uuid
organization_id
Organization Id
Any of:
string format: uuid
cluster_id
required
Cluster Id
string format: uuid
name
required
Name
string
app_type
required
AppType
string
Allowed values: web_app api database static_site container helm
status
required
DeploymentStatus
string
Allowed values: pending provisioning promoting running stopped failed error migrating deleting
config
Config
Any of:
object
key
additional properties
any
values_yaml
Values Yaml
Any of:
string
git_path
Git Path
Any of:
string
endpoint_url
Endpoint Url
Any of:
string
error_message
Error Message
Any of:
string
cpu_request
Cpu Request
Any of:
number
memory_request_mb
Memory Request Mb
Any of:
integer
replicas
Replicas
Any of:
integer
container_port
Container Port
Any of:
integer
storage_size_gb
Storage Size Gb
Any of:
integer
command
Command
Any of:
Array<string>
args
Args
Any of:
Array<string>
deployment_type
Deployment Type
Any of:
string
helm_repo_url
Helm Repo Url
Any of:
string
helm_chart_name
Helm Chart Name
Any of:
string
helm_chart_version
Helm Chart Version
Any of:
string
custom_values_yaml
Custom Values Yaml
Any of:
string
image_update_strategy
Image Update Strategy
Any of:
string
image_update_constraint
Image Update Constraint
Any of:
string
image_allow_tags
Image Allow Tags
Any of:
string
image_ignore_tags
Image Ignore Tags
Any of:
string
is_adopted
Is Adopted
boolean
source_namespace
Source Namespace
Any of:
string
created_at
required
Created At
string format: date-time
updated_at
required
Updated At
string format: date-time
provider
Provider
Any of:
string
region
Region
Any of:
string
cluster_status
Cluster Status
Any of:
string
cluster_error
Cluster Error
Any of:
string

Example

{
"app_type": "web_app",
"status": "pending",
"is_adopted": false
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object

Example generated

{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example",
"input": "example",
"ctx": {}
}
]
}