Skip to content

Promote Deployment

POST
/deployments/{deployment_id}/promote
curl --request POST \
--url https://api.mengi.cloud/deployments/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/promote \
--header 'Content-Type: application/json' \
--data '{ "target_cluster_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "new_name": "example", "delete_source": false, "overrides": { "name": "example", "config": {}, "cpu_request": 1, "memory_request_mb": 1, "replicas": 1, "container_port": 1, "storage_size_gb": 1, "environment_variables": [ { "name": "example", "value": "example", "secret_ref": "example" } ], "docker_image": "example", "volumes": [ { "path": "example", "sizeGb": 10, "purpose": "example" } ], "run_as_uid": 1, "helm_chart_version": "example", "custom_values_yaml": "example", "image_update_strategy": "example", "image_update_constraint": "example", "image_allow_tags": "example", "image_ignore_tags": "example", "custom_domain": "example", "failover_health_route": true, "https_redirect": true, "helm_ingress_values": true, "health_checks": { "liveness": { "enabled": true, "type": "http", "path": "example", "initial_delay_seconds": 1, "period_seconds": 1, "timeout_seconds": 1, "failure_threshold": 1 }, "readiness": { "enabled": true, "type": "http", "path": "example", "initial_delay_seconds": 1, "period_seconds": 1, "timeout_seconds": 1, "failure_threshold": 1 }, "startup": { "enabled": true, "type": "http", "path": "example", "initial_delay_seconds": 1, "period_seconds": 1, "timeout_seconds": 1, "failure_threshold": 1 } }, "additional_ports": [ { "port": 1, "name": "example", "protocol": "TCP" } ], "backups": { "enabled": false, "schedule": "hourly", "retention_days": 7 }, "command": [ "example" ], "args": [ "example" ] } }'

Promote/migrate a deployment to another cluster.

This copies the deployment configuration to a new cluster without migrating any state or persistent data. The new deployment will start fresh on the target cluster.

The promotion is performed asynchronously by the worker. The new deployment is created with PROMOTING status and will transition to RUNNING when complete.

Use cases:

  • Shared vCluster → Dedicated cluster (scaling up)
  • Dedicated cluster → Dedicated cluster (region/provider change)
  • Dedicated cluster → Shared vCluster (scaling down for cost savings)
deployment_id
required
Deployment Id
string format: uuid
Media typeapplication/json
DeploymentPromotionRequest

Request to promote/migrate a deployment to another cluster.

object
target_cluster_id
required
Target Cluster Id
string format: uuid
new_name
New Name
Any of:
string
delete_source
Delete Source
boolean
overrides
Any of:
DeploymentUpdate
object
name
Name
Any of:
string
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
storage_size_gb
Storage Size Gb
Any of:
integer
environment_variables
Environment Variables
Any of:
Array<object>
EnvironmentVariable

Environment variable configuration.

object
name
required
Name
string
value
Value
Any of:
string
secret_ref
Secret Ref
Any of:
string
docker_image
Docker Image
Any of:
string
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
<= 2147483647
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
custom_domain
Custom Domain
Any of:
string
failover_health_route
Failover Health Route
Any of:
boolean
https_redirect
Https Redirect
Any of:
boolean
helm_ingress_values
Helm Ingress Values
Any of:
boolean
health_checks
Any of:
HealthChecksConfig

Container health check configuration (stored in the deployment config).

On update, an empty object clears any overrides and restores automatic detection.

object
liveness
Any of:
HealthCheckProbe

One container health check (liveness or readiness probe).

All fields except enabled are optional: an unset type keeps the auto-detected HTTP/TCP choice, an unset path keeps the detected endpoint, and unset timings keep the platform defaults.

object
enabled
Enabled
boolean
default: true
type
Type
Any of:
string
Allowed values: http tcp
path
Path
Any of:
string
initial_delay_seconds
Initial Delay Seconds
Any of:
integer
<= 3600
period_seconds
Period Seconds
Any of:
integer
>= 1 <= 3600
timeout_seconds
Timeout Seconds
Any of:
integer
>= 1 <= 3600
failure_threshold
Failure Threshold
Any of:
integer
>= 1 <= 1000
readiness
Any of:
HealthCheckProbe

One container health check (liveness or readiness probe).

All fields except enabled are optional: an unset type keeps the auto-detected HTTP/TCP choice, an unset path keeps the detected endpoint, and unset timings keep the platform defaults.

object
enabled
Enabled
boolean
default: true
type
Type
Any of:
string
Allowed values: http tcp
path
Path
Any of:
string
initial_delay_seconds
Initial Delay Seconds
Any of:
integer
<= 3600
period_seconds
Period Seconds
Any of:
integer
>= 1 <= 3600
timeout_seconds
Timeout Seconds
Any of:
integer
>= 1 <= 3600
failure_threshold
Failure Threshold
Any of:
integer
>= 1 <= 1000
startup
Any of:
HealthCheckProbe

One container health check (liveness or readiness probe).

All fields except enabled are optional: an unset type keeps the auto-detected HTTP/TCP choice, an unset path keeps the detected endpoint, and unset timings keep the platform defaults.

object
enabled
Enabled
boolean
default: true
type
Type
Any of:
string
Allowed values: http tcp
path
Path
Any of:
string
initial_delay_seconds
Initial Delay Seconds
Any of:
integer
<= 3600
period_seconds
Period Seconds
Any of:
integer
>= 1 <= 3600
timeout_seconds
Timeout Seconds
Any of:
integer
>= 1 <= 3600
failure_threshold
Failure Threshold
Any of:
integer
>= 1 <= 1000
additional_ports
Additional Ports
Any of:
Array<object>
AdditionalPort

An extra container port, exposed on the pod and the deployment’s in-cluster Service (the ingress keeps routing to the main container port).

name must be a valid Kubernetes port name (lowercase alphanumerics and ‘-’, at most 15 chars, at least one letter); it defaults to port-. An unset protocol means TCP.

object
port
required
Port
integer
>= 1 <= 65535
name
Name
Any of:
string
protocol
Protocol
Any of:
string
Allowed values: TCP UDP
backups
Any of:
BackupsConfig

Scheduled backup configuration (stored in the deployment config).

Backups capture the deployment’s namespace: workload configuration, in-namespace secrets, and all persistent volume data. Managed databases are excluded — they have their own backup mechanism. Requires a dedicated cluster and the “backups” feature flag.

object
enabled
Enabled
boolean
schedule
Schedule
string
default: daily
Allowed values: hourly daily weekly
retention_days
Retention Days
integer
default: 7 >= 1 <= 90
command
Command
Any of:
Array<string>
args
Args
Any of:
Array<string>

Successful Response

Media typeapplication/json
DeploymentPromotionResponse

Response after promoting a deployment.

object
source_deployment_id
required
Source Deployment Id
string format: uuid
new_deployment_id
required
New Deployment Id
string format: uuid
target_cluster_id
required
Target Cluster Id
string format: uuid
source_deleted
required
Source Deleted
boolean
message
required
Message
string

Example generated

{
"source_deployment_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"new_deployment_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"target_cluster_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"source_deleted": true,
"message": "example"
}

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": {}
}
]
}