Learning · Twelve-Factor

Twelve-factor on Kubernetes today

How the factors map to containers, ConfigMaps, Deployments, and where the original text needs updating.

Twelve-factor still pays rent on Kubernetes — if you map intents to primitives deliberately.

Natural fits

FactorK8s / cloud expression
ConfigConfigMap, Secret, external stores
Build/release/runimage digest + GitOps/CD release
ProcessesPods as disposable units
Concurrencyreplicas, separate worker Deployments
Port bindingcontainerPort + Service/Ingress
Logsstdout → node agent / platform logging
Disposabilityprobes, preStop, graceful termination
AdminJobs, one-off pods with same image

Still commonly violated

  • secrets baked into images or checked into git
  • rebuilding different images per environment
  • durable state on local disk without PVC/backing service design
  • “admin” via kubectl exec into a random prod pod with untracked scripts
  • logs only inside containers, never shipped

What the original essay underplays

  • service mesh, sidecars, and multi-container pods
  • operators and CRDs for complex backing services
  • security/admission policy as part of the platform contract
  • data migrations and schema compatibility (still your problem)

Use as a review lens

In design review: walk I–XII quickly. Gaps become backlog before they become outages. Complements — does not replace — domain design, SLOs, and threat modeling.

← Twelve-Factor