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 →
.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
sops -e -i secrets/prod/shop.yaml, commit.- CI prod role has
kms:Decrypton that key only; dev CI usesSOPS_AGE_KEYfrom CI secrets. - 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.
More on Secrets & Security
A secret was committed in plaintext in `values-prod.yaml`. What do you do?BeginnerWho can read secrets passed to Helm, and how do you reduce exposure?IntermediateA chart from the internet requests cluster-admin. How do you evaluate and contain it?AdvancedYour security team asks you to scan Helm charts for misconfigurations in CI. How?BeginnerHow do you rotate a database password managed through Helm without downtime?AdvancedYour CI service account for Helm has cluster-admin "because it was easier". How do you fix it?Intermediate