Most teams run the same app more than once: dev for trying things, stage
for rehearsing the release, prod for users. The three should differ in a
few values, such as the hostname or the number of replicas, and in nothing
else. This post builds that with one Kapitan
inventory for three environments on two clusters.
It shows where each value is set, which environments a change reaches,
and a CI check that fails when prod drifts from stage.
The project is
multi-env in
kadet-hub/examples. Its check script compiles the inventory, rolls a
change through the environments in a copy, and deploys all three
environments to two kind clusters. CI runs it on every
change and once a week, and every output below comes from it.
The setup
The app is miniflux , a feed reader with a PostgreSQL
of its own, from the kadet-hub recipe 1.0.0. It runs
miniflux 2.3.4 and PostgreSQL 18.6, rendered by the
kubernetes generator 1.14.0. dev and stage
share the cluster multienv-a , prod runs alone on multienv-b .…