Secrets in a GitOps repo: how do you handle them?
IntermediateScenarioDeployment Strategies and GitOps
Answer
Situation read → Git must not hold plaintext secrets.
What I'd do →
- Use External Secrets Operator syncing from AWS Secrets Manager/Vault into Kubernetes Secrets, with only
ExternalSecretobjects in Git. - Or encrypt in Git with Sealed Secrets or SOPS (age/KMS).
- Rotate at the source and let the operator refresh.
Why → Git stores references or ciphertext, never raw values.
Interview tip → ESO keeps secret values out of Git entirely, SOPS keeps them encrypted in Git.