Problem
Passwords, API keys and certificates end up in repositories, images and environment files where they leak and never rotate. Revoking a leaked secret requires redeploying everything that embeds it.
Also known as: vault-pattern, secret-store
Keep credentials out of code and config, issue them on demand with strong identity, and rotate them automatically.
Passwords, API keys and certificates end up in repositories, images and environment files where they leak and never rotate. Revoking a leaked secret requires redeploying everything that embeds it.
Secrets management replaces static credentials in files with runtime retrieval governed by identity and policy. The best secret is one that does not exist: use workload identity or short-lived tokens where the platform supports it.
Roll this out by inventorying existing secrets first, then migrating the most sensitive ones, such as production database and signing credentials. Run secret scanning in CI and on repositories continuously, and practice rotating each secret type so that a real leak becomes a routine procedure rather than an emergency.
Pod starts -> presents service account JWT
Vault verifies with Kubernetes API -> returns token (TTL 15m, policy: payments-ro)
App -> GET secret/data/payments/db (token)
Vault -> mints DB user app-7f3a, TTL 1h # dynamic secret
App uses credentials; lease expires -> Vault revokes the DB user
Audit log: who, which path, when
Static secrets are versioned, and consumers pick up new versions by re-fetching on a schedule or via a sidecar agent that renders files.
Medium — HA secret store
Medium — unseal, backup, policy upkeep
Medium
Secret store outage prevents workloads from starting
Secrets logged or exposed in crash dumps
Overbroad policies let one service read all secrets