Interview Prep/GitOps & Argo CD/Secrets, Controller Performance & Recovery

A KSOPS or SOPS-based app fails with `Error: failed to get the data key required to decrypt the SOPS file`.

IntermediateTroubleshootingSecrets, Controller Performance & Recovery
Answer

Likely causes → The repo-server cannot access the key: missing age private key secret mount, IRSA role without kms:Decrypt on the CMK, or the file was encrypted with a recipient list that does not include the cluster's key.

Diagnose →

kubectl -n argocd exec deploy/argocd-repo-server -- env | grep SOPS
grep -A3 'kms\|age' secrets.enc.yaml

Fix → Mount the age key (SOPS_AGE_KEY_FILE) or grant KMS decrypt to the repo-server's role; re-encrypt with sops updatekeys after adding the cluster recipient to .sops.yaml.

Prevent → Keep recipients in .sops.yaml and fail CI when an encrypted file lacks the cluster recipient.

All GitOps & Argo CD questions Roadmap: Argo CD (GitOps)

More on Secrets, Controller Performance & Recovery