Build Once, Promote Twice: Why Rebuilding per Environment Bites You
Rebuilding the same commit for staging and production is the quiet way two environments end up running different software while every dashboard claims they match.
blog
70 articles on building and operating reliable systems.
Showing 70 of 70 articles
Rebuilding the same commit for staging and production is the quiet way two environments end up running different software while every dashboard claims they match.
I spent two years calling Ansible legacy, then inherited forty Ubuntu boxes with no SSH hardening and found it was still the fastest honest answer.
Reverting the merge and letting Argo sync leaves the system broken if the change also wrote data, moved a secret, or changed something the controller never owned.
Docker Hub returns 429 on a routine pull, twelve parallel jobs retry at once, and a green pipeline turns red without a single line of code changing.
Your pod is Pending, the events mention a persistent volume claim, and the node has plenty of free memory. Storage is the answer almost every time.
Horizontal autoscalers are simple to enable and easy to misconfigure, and the symptom is never a slow page, it is a sawtooth of latency that no single threshold will explain.
A container that logs to a file inside its own filesystem fills that filesystem, and the restart that follows looks like an application crash to everyone watching.
Your Git repository is world-readable the day it is created, and the encrypted file that sits inside it is only as good as the key that unlocks it on every node in the cluster.
A single label added to a counter can multiply your time series by ten thousand, and the invoice arrives weeks later pointing at code that looks perfectly reasonable.
Mutual TLS answers a question most teams never ask precisely enough, and the gap between 'the certificate was valid' and 'this caller is allowed to do this' is where the interesting failures live.
One cluster in Git is a repository. Fifty clusters in Git is a system with a topology, and the branching strategy you choose decides whether it stays manageable.
The status page, the Slack thread, and the executive update are three different documents. Writing them after the incident starts is how silence gets misread as an outage.
A pod that will not schedule is rarely a capacity problem. It is almost always a rule you wrote six months ago that nobody remembers writing.
Branch protection catches what a reviewer notices. A merge queue catches what four simultaneous pull requests do to each other after they are already approved.
Treating prompt injection as an AI quirk leads to prompt patches. Treating it as untrusted input reaching a privileged interpreter leads to the architecture you already know how to build.
Ninety-nine point nine is a number nobody chose for a reason. An error budget turns availability from a preference into a shared spending limit.
Missing requests get a pod evicted under pressure. Missing limits get it throttled at the worst moment. Each one fails differently, on a different timeline.
The point of a multi-stage build is not a smaller image, it is a boundary. Everything the compiler needed stays on the far side of the line you draw.
A test that fails sometimes is worse than no test at all. Quarantine works only when it is a queue with an owner and an expiry, never a mute button.
Drift detection will tell you what changed. It will not tell you why someone changed it, or who decides whether it stays. The tooling is the easy half.
IAM answers what a principal can do. SCPs answer what an account can ever do, even if someone gets admin. How multi-account structure catches mistakes IAM never sees.
Bigger model, better answer, four times the bill and triple the p95. How to reason about model size, caching, and routing so unit economics survive real traffic.
Active-active sounds like the answer until you price the second region and meet your first cross-region write. The three tiers worth considering, and the bill before the demo.
Terraform plans run to thousands of lines and nobody reads them all. Turn 'is this plan acceptable?' into a test that fails the PR, not an argument after it lands.
Every backlog says 'we'll fix it later' and later never arrives. A repeatable way to score debt, pick the three items worth a sprint, and drop the rewrite that never shipped.
A four-minute pipeline people trust beats a forty-minute one they skip. Layered caching, path-based triggering, and parallel tests, plus the order that matters.
restart=always is not a health check. HEALTHCHECK, backoff, and why your container ignores SIGTERM: the three things that decide whether self-healing actually works.
Metrics say something is slow, logs say what one box did; tracing says which hop cost the time. An OpenTelemetry setup that doesn't drown you in span volume.
What actually goes wrong once Argo CD is running: out-of-band changes, sync loops fighting your controller, and how to break glass without breaking GitOps.
ClusterIP, Endpoints, CoreDNS, and Ingress each do one job. Learn which object broke and most 'Kubernetes networking' problems resolve in two kubectl commands.
A golden set, a rubric, and a regression run are enough to know whether your prompt change helped or hurt: you don't need a research team to stop shipping AI on vibes.
Pending, ImagePullBackOff, OOMKilled, CrashLoopBackOff: four states, four meanings, and the kubectl commands that tell you which one you actually have.
The promotion path is where most GitOps setups quietly break: environments, image tags, and the promotion model that stops staging drifting from production.
Page volume, escalation, and handoffs decide whether on-call is a job or a lifestyle: how to build a rotation the team will still volunteer for in a year.
Chunking, hybrid search and metadata filters decide whether your internal assistant quotes the right page or invents one: the retrieval layer matters more than the model.
RPO and RTO in plain language, the four tiers that actually exist, and the one practice (the restore drill) that separates a plan from a hope.
The managed-vs-self-hosted argument usually starts with cost. It should start with who is awake at 3 AM: a decision framework that holds up.
Terraform is still the right default. But there is a specific class of problem where HCL fights back, and a real programming language quietly wins.
You inherited an AWS account with no state file. Here is the import workflow that avoids a 400-resource destroy plan and a rewrite nobody budgeted for.
What actually lives in a Terraform state file, why the backend choice matters more than your module code, and how to recover from a stuck lock.
Scanning tells you what is inside the image. These four settings decide what it can do once it is running: what breaks when you turn them on.
Tags move underneath you and nobody tells you. Pinning digests, gating on real CVEs, emitting an SBOM, and signing what my pipeline actually built.
An access key in CI secrets has no expiry and no owner. OIDC federation lets the pipeline authenticate per run instead of carrying a permanent password.
Out of the box a cluster lets almost anything run as root with a mounted token and an open network. Three labels, one role cleanup, and a default-deny policy fix most of it.
A scanner that blocks on every historic finding gets bypassed within a week. Baselines, severity floors, and the split between fast PR checks and slow nightly ones.
AI code review, agentic CI, generated tests: I tried the lot. Here's what survived a year of real repositories, and what quietly got turned off.
Kernel-level metrics, traces, and network policy with no agents in your pods: how eBPF quietly moved from research project to default infrastructure.
The Terraform fork that became a Linux Foundation project, state encryption built in, and how to decide between tofu and terraform without starting a religion war.
Golden paths, internal developer portals, and the honest question of whether your team needs a platform at all: what platform engineering actually buys you.
WASM at the edge, Wasm plugins in proxies and databases, and whether containers should be looking over their shoulder: where WebAssembly actually earns its keep in 2026.
Trunk-based development with flags instead of release branches: how we ship code continuously but expose features only when we're ready.
set -euo pipefail, quoting like you mean it, and other bash habits that turn fragile one-liners into scripts you can trust when it matters.
The .env file I committed once, how I cleaned it up, and the boring habits that keep API keys out of git history for good.
Logs Insights queries, metric filters, and alarms that matter: finding root cause from CloudWatch alone, the way you have to when SSH is not an option.
Automated backups, point-in-time recovery, snapshots versus replicas, and why you should restore a database on purpose before you need to by accident.
Burstable instances, credit balances, and CloudWatch graphs: how to pick an EC2 size you won't regret, and how to shrink one you already regret.
Standard, IA, Glacier tiers, lifecycle rules, and the retrieval fees that ruin your day: how I stopped overpaying for object storage.
A botched inline policy, an expired access key, and an empty permission set: the IAM story every cloud engineer seems to live through once.
Subnets, gateways, route tables, security groups: the AWS networking basics I wish someone had drawn on a whiteboard for me the first time.
Stop shipping pipelines held together with duct tape. A practical playbook for CI/CD that teams trust on day one, and still trust six months later.
Bridge networks, port publishing, and why localhost lies to you inside a container: the mental model that made container networking stop being magic.
Recreate, rolling, blue-green, canary. How to pick the right Kubernetes deployment strategy, and what can go wrong with each one.
Blameless timelines, action items that ship, and the meeting structure that turns outages into engineering instead of finger-pointing.
Aliases, TTLs, health checks, and failover routing: the DNS mechanics behind every domain cutover, including the ones you'll do at midnight.
Multi-stage builds, distroless bases, and layer hygiene. A practical guide to shrinking Docker images the right way.
How to structure Terraform for multiple environments without copy-pasting modules or stepping on production state.
Dashboards are how you OBSERVE, not what you're building. Design observability around golden signals, SLOs, and concrete questions.
Git is the source of truth. Argo CD syncs reality to git. A field-tested setup: repos, apps, sync waves, and the gotchas.
Effective Linux hardening isn't a security checklist that makes the machine unusable. It's SSH config, patching, least privilege, and logging.
Right-sizing, lifecycle, and reserved coverage. Cloud cost cuts don't come from dashboards, they come from three decisions made weekly.