Interview Prep/Helm/Secrets & Security

Set up helm-secrets with SOPS and AWS KMS for prod and age for dev.

IntermediateScenarioSecrets & Security
Answer

Situation read → Different keys per environment; prod decryptable only by the prod deploy role.

What I'd do →

  1. .sops.yaml:
creation_rules:
  - path_regex: secrets/prod/.*\.yaml$
    kms: arn:aws:kms:ap-south-1:123456789012:key/abcd-1234
  - path_regex: secrets/dev/.*\.yaml$
    age: age1x7...dev
  1. sops -e -i secrets/prod/shop.yaml, commit.
  2. CI prod role has kms:Decrypt on that key only; dev CI uses SOPS_AGE_KEY from CI secrets.
  3. Deploy with -f secrets://secrets/prod/shop.yaml.

Why → Encryption keys enforce who can deploy which environment's secrets.

Interview tip → Mention per-environment key separation.

All Helm questions Roadmap: Helm

More on Secrets & Security