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 →
- Prefer dual credentials: create a second DB user or set the new password on the DB first (ALTER ROLE).
- Update the secret source (SOPS file or Secrets Manager), deploy; checksum annotation rolls pods with the new password.
- Verify, then revoke the old password.
- 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".
More on Secrets & Security
A secret was committed in plaintext in `values-prod.yaml`. What do you do?BeginnerWho can read secrets passed to Helm, and how do you reduce exposure?IntermediateSet up helm-secrets with SOPS and AWS KMS for prod and age for dev.IntermediateA chart from the internet requests cluster-admin. How do you evaluate and contain it?AdvancedYour security team asks you to scan Helm charts for misconfigurations in CI. How?BeginnerYour CI service account for Helm has cluster-admin "because it was easier". How do you fix it?Intermediate