Skip to main content

Preview Environment Simulator

See how a pull request becomes a temporary copy of your app—complete with a private URL, safe test data, review checks, and automatic cleanup.

Category: DevOps

What You Will Learn

  • How a pull-request label or Git declaration creates preview-environment intent
  • How GitHub Actions, Argo CD ApplicationSets, Helm, and Kubernetes reconcile that intent
  • How single-service previews differ from coordinated full-stack UAT environments
  • How data strategy, resource sizing, access policy, and TTL affect cost and isolation
  • How to diagnose branch mismatches, quota failures, missing secrets, DNS issues, and revision drift
  • Which health, test, revision, configuration, and cost evidence should return to a pull request
  • Why teardown must be automatic, observable, and driven through the same control path as creation

Topics covered: preview environments, gitops, kubernetes, argo cd, github actions, pull requests, uat, platform engineering, ephemeral environments, educational, interactive

// simulator

Preview Environment Simulator

See how a pull request becomes a temporary copy of your app—complete with a private URL, safe test data, review checks, and automatic cleanup.

Supported bySvixDigitalOceanDevDojoSMTPfastQuizAPIBecome a sponsor
PR #184
checkout-v2

Turn a pull request into a real environment

Follow one control path from developer intent to a live URL—and back to cleanup.

about 20 min·$0.53/hr·TTL 8h
  1. 1Open PR
  2. 2Publish image
  3. 3Deploy
  4. 4Review
  5. 5Clean up
Active · Developer

Ask for a preview

Add the preview label to begin.

Desired state → running evidence

One control path from pull request to preview URL

Inspired by Atomsized
sha-8f3c2a1 retained
01

Developer intent

Developer

PR #184 + preview label

your turn

Add the label to request a preview

CI pipeline

Build image

waiting

CI packages the change

CI pipeline

Push registry

waiting

checkout:sha-8f3c2a1

02

GitOps control plane

Argo CD · auto

Automation repository

waiting

Automatically detects the labeled PR

Argo CD · auto

Argo CD ApplicationSet

waiting

Commit and image digest become Helm values

03

Ephemeral environment

K8s · auto

Kubernetes namespace

waiting

preview-pr-184 · isolated boundary

K8s · auto

WEB

waiting

application

K8s · auto

API

waiting

application

K8s · auto

DB snapshot

waiting

isolated data

Neon
K8s · auto

Redis

waiting

isolated cache

K8s · auto

Review URL

waiting

DNS · ingress · TLS · revision

Running status returns to PR #184. Health and the deployed revision will appear here.
Automatic cleanup removes the preview as one unit.Close the PR, remove the label, or let the TTL expire.
Add the preview label to begin.
Inspect the generated evidence

Preview request

environment: checkout-uat-184
trigger: fullstack-preview
repositories:
  web: feature/checkout-v2
  api: feature/checkout-v2
data: masked-snapshot
ttl: 8h

Evidence returned to PR #184

Private URL
https://checkout-uat-184.preview.example.dev
Running commit
8f3c2a1
Safe data
Masked stage snapshot snap-20260804
Automatic expiry
8 hours

DevOps Daily × Atomsized

Inspired by a real preview-platform workflow

This simulator was developed in partnership with Atomsized and is inspired by their published approach to pull-request previews and coordinated full-stack UAT environments. The simulation is educational: it teaches the platform decisions and control-plane mechanics rather than reproducing a vendor product.

Read Atomsized's preview environments case study

A preview environment is a lifecycle, not a URL

1. Declare intent in Git

A label is enough for a single-service preview. A coordinated stack needs an explicit declaration of repositories and branch overrides so every revision is reviewable.

2. Return evidence to the PR

A green URL is incomplete evidence. Reviewers need the deployed commit and image, health gates, tests, configuration differences, logs, access policy, and expiry.

3. Reconcile deletion too

Closing a PR, removing its label, deleting its declaration, or reaching its TTL should remove ingress, workloads, data, and namespaces without leaving orphaned cost behind.

What a platform team must decide

Define who may open the environment, how preview secrets are sourced, whether data is synthetic or masked, which readiness gates block review, how DNS and certificates are issued, and which quota, TTL, budget, and orphan alerts enforce cleanup. These policies turn an ad hoc deployment script into a dependable internal platform capability.

Try next

Sponsored
Carbon Ads
$ cd /games
// share