How do you deliver secrets to Kubernetes pods: env vars, mounted files, or SDK calls?
IntermediateProductionSecrets Management Architecture
Answer
- Mounted files (Secrets Store CSI driver, Vault Agent sidecar, or a Kubernetes Secret volume): good default; can be refreshed without restart and are not visible in
kubectl describeor process listings. - Environment variables: simple, but static for the pod's lifetime, leak via crash dumps and child processes, and require restarts to rotate.
- SDK calls: most flexible and supports dynamic secrets, but couples the app to the secrets backend.
We default to files via External Secrets Operator or CSI, and use SDK calls for dynamic credentials.
More on Secrets Management Architecture
How would you design a secrets management architecture for a multi-cloud, multi-cluster company?AdvancedVault vs AWS Secrets Manager: how do you choose in production?IntermediateHow do you run Vault in production for high availability?AdvancedHow do you solve the "secret zero" problem?IntermediateHow do Vault dynamic database credentials work operationally, and what can go wrong?AdvancedHow does AWS Secrets Manager rotation work under the hood?Intermediate