Interview Prep/Helm/Secrets & Security

How do you rotate a database password managed through Helm without downtime?

AdvancedScenarioSecrets & Security
Answer

Situation read → Changing the password in values updates the Secret, but the DB still has the old one, and pods need restarting.

What I'd do →

  1. Prefer dual credentials: create a second DB user or set the new password on the DB first (ALTER ROLE).
  2. Update the secret source (SOPS file or Secrets Manager), deploy; checksum annotation rolls pods with the new password.
  3. Verify, then revoke the old password.
  4. With External Secrets plus Reloader, rotation happens without a Helm deploy.

Why → Rotation must be coordinated between the DB and consumers.

Interview tip → Say "change at the source first, then roll consumers, then revoke".

All Helm questions Roadmap: Helm

More on Secrets & Security