Twelve-Factor
Twelve-factor is a set of disciplines for building SaaS-style apps that deploy cleanly to modern platforms. These notes explain each concern in senior language — and where to adapt the original advice for containers and Kubernetes.
Topics
- What twelve-factor is for
Portable, disposable, continuously deployable apps — the problem the twelve factors were written to solve.
- Codebase, dependencies, and config
Factors I–III — one codebase, explicit deps, and config in the environment.
- Backing services and build, release, run
Factors IV–V — attach resources by URL and strictly separate build, release, and run.
- Processes, port binding, and concurrency
Factors VI–VIII — stateless processes, self-binding ports, and scale out via process model.
- Disposability, parity, logs, and admin
Factors IX–XII — fast startup/shutdown, dev/prod parity, logs as event streams, and one-off admin tasks.
- Twelve-factor on Kubernetes today
How the factors map to containers, ConfigMaps, Deployments, and where the original text needs updating.
- Twelve-factor anti-patterns
Classic violations — snowflake servers, env-specific builds, and sticky state disguised as cloud-native.