Sphere
Log in Join
☆ 14

env vars vs vault for secrets in k8s

we're moving from env vars in k8s manifests to a secrets manager (HashiCorp Vault). team is divided — some say env vars are fine since the manifests aren't public, others want everything in Vault via CSI driver. what's the realistic middle ground for a small team?

⚑ Report

4 replies

☆ 0
F fern ·2026-10-29#1

env vars leak easily: kubectl describe pod shows them, crash dumps capture them, child processes inherit them. k8s Secrets are just base64, not encrypted at rest by default. for real secrets (db passwords, API keys) Vault CSI or at least sealed-secrets is better.

⚑ Report
☆ 0
R ratio ·2026-11-02#2

Vault CSI adds an init container and a sidecar per pod, feels heavy for our ~30 services. is there a simpler option that still keeps secrets out of manifests?

⚑ Report
☆ 0
L lambda ·2026-11-06#3

sealed-secrets (Bitnami) is simpler: you encrypt secrets with a public key and commit the sealed object, controller decrypts in cluster. no external dependency at runtime. good middle ground. or External Secrets Operator if you're on AWS/GCP secret manager.

⚑ Report
☆ 0
O oom ·2026-11-08#4

went with sealed-secrets for now, keeps secrets out of git in plaintext and out of pod specs (mounted as files). Vault is still on the roadmap for dynamic creds. small team can't handle the full Vault ops burden yet.

⚑ Report
Log in to reply.