ブログに戻る

Branch-based deployments without the AWS bill

Aug 3, 2026 8 min read LinkedInでシェア

This article isn't available in your language yet — showing the original version.

Branch-based deployments sound great until you look at the infrastructure bill.

A team with 20 active pull requests could end up maintaining 20 preview environments, each with compute, networking, databases, and other services running around the clock.

The alternative is usually a shared staging environment.

That solves the bill, but creates a different problem: branches are no longer isolated.

There is a simpler model:

Create a real Kubernetes cluster for the branch, use it while you need it, and destroy it when you’re done.

A cluster should have a short life

With RackMint, a CI pipeline can create a cluster for a branch:

rackctl create pr-142

Deploy the application normally:

helm install app ./charts

And get a real HTTPS endpoint for testing.

The important part is that this isn’t a namespace pretending to be an environment. The branch gets its own Kubernetes cluster, so the application can deploy its frontend, backend, PostgreSQL, Redis, RabbitMQ, workers, and other dependencies without worrying about accidentally sharing resources with another branch.

When the environment expires, the cluster is removed.

No forgotten staging environments.

No manual cleanup.

No paying for infrastructure that nobody is using.

HTTPS should be automatic

A preview environment isn’t very useful if someone has to configure DNS and TLS before opening it.

RackMint handles the gateway and SSL configuration as part of the environment.

If wildcard SSL is already configured for the parent domain, new environment subdomains can become available in roughly a second. Initial SSL setup, when required, takes longer, but subsequent environments remain fast.

That means the workflow is simply:

Create cluster

Deploy application

Get HTTPS URL

Run tests

The URL becomes part of the deployment primitive rather than another infrastructure task.

Pay for the seconds, not the branch

The other half of ephemeral infrastructure is billing.

A branch shouldn’t cost you for the hours when nobody is using it.

RackMint uses per-second billing, so short-lived environments are economically viable. Create an environment, run your tests, inspect the result, and destroy it.

A ten-minute test environment should not need to become a monthly infrastructure commitment.

This changes the calculation around branch environments.

Instead of asking:

“Can we afford an environment for every branch?”

you can ask:

“How long does this branch actually need an environment?”

That’s a much better question.

Disposable infrastructure makes branch deployments practical

The point of branch-based deployments isn’t to create more infrastructure.

It’s to make infrastructure temporary.

A branch exists temporarily. Its test environment can follow the same lifecycle:

Branch created

Kubernetes cluster created

Application deployed

Tests / QA / review

Environment expires

Cluster deleted

When creating a new environment is fast and billing is granular, throwing an environment away stops being wasteful.

Every branch can have a real environment without turning every branch into another AWS bill.

実際に試してみませんか?

数秒で使い捨てのKubernetesクラスタを作成できます。長期的な契約は不要です。

関連記事

guides

Why your test environments should be disposable

Long-lived staging environments accumulate drift. Disposable clusters let every test run start from a clean, real deployment—with real dependencies, real networking, and no cleanup burden.

Aug 12, 2026 9 min read
product

How our per-second billing actually works

A look at the upfront reservation, proportional CPU/RAM pricing, and why prepaid accounts get a TTL.

Jul 28, 2026 3 min read