Skip to content
GitHub

Promote between environments

Promotion takes what runs in one environment and applies it to the same app in another, typically stagingproduction. It is the “I tested this, now ship it” button.

On the app page, choose the target environment under Promote, press Preview changes, review the diff, then Promote.

A dry run reports the changes without applying them:

Terminal window
curl -fsS -X POST "$KUBEN_URL/api/v1/projects/shop/environments/staging/apps/api/promote" \
-H "Authorization: Bearer $KUBEN_TOKEN" -H 'Content-Type: application/json' \
-d '{"to_environment": "production", "dry_run": true}'

Drop dry_run (or set it to false) to promote. The result lists every field that changed and every warning.

Copied to the target Kept on the target
image its domains
commands and ports its scaling (replicas and size)
health check its volumes
environment variables

Production usually has more replicas, a bigger size preset and its own domains; promotion never touches those. If the app does not exist in the target environment yet, it is created with the source’s spec and default scaling.

Environment variables that reference a secret are copied as references. The preview warns about every referenced secret that does not exist in the target environment, so you can create it there first:

Terminal window
curl -fsS -X PUT "$KUBEN_URL/api/v1/projects/shop/environments/production/secrets/db-credentials" \
-H "Authorization: Bearer $KUBEN_TOKEN" -H 'Content-Type: application/json' \
-d '{"data": {"url": "postgres://…"}}'

Promotion needs the release-promote permission on the target environment, which admins and owners have. The usual split is: developers deploy to staging with their own or a scoped token; admins promote to production. A promotion creates a new release in the target and is recorded in the audit log with both environments.