How do you manage secrets in GitOps without committing them in plain text?
IntermediateScenarioConfiguration, Secrets and storage
Answer
Situation read → Argo CD syncs from Git but the secrets must not be in the repo.
What I'd do →
- Use External Secrets Operator: a
SecretStorepoints to AWS Secrets Manager and anExternalSecretcreates the Secret - Or use Sealed Secrets: encrypt with
kubesealand commit the SealedSecret - Or SOPS with KMS and the Argo CD or Flux integration
- Restrict who can read the resulting Secret
- Plan rotation: ESO refreshes on
refreshInterval
Why → References or encrypted payloads are safe in Git, and the cluster resolves them at runtime.
Interview tip → Mention the trade-off: ESO needs access to the secret store, Sealed Secrets keeps the key in the cluster.
More on Configuration, Secrets and storage
How do you inject configuration into pods and what are the options?BeginnerA ConfigMap was updated but the pod still shows old values. Why?IntermediateHow do you store a database password safely in Kubernetes?BeginnerA pod fails with `CreateContainerConfigError` and a missing key. What happened?BeginnerWhat is the difference between emptyDir, hostPath, PV/PVC and when do you use each?BeginnerA StatefulSet's PVC stays Pending. How do you debug?Intermediate