The security team says "Kubernetes Secrets are only base64". How do you respond and what do you change?
IntermediateScenarioSecurity incidents
Answer
Situation read → They're right that base64 is encoding, not encryption. The real risks are etcd storage, who can read Secrets via RBAC, and Secrets sitting in Git.
What I'd do →
- At rest: enable envelope encryption of Secrets with KMS (EKS supports this with a customer-managed key).
- Access: restrict
get/liston Secrets via RBAC;listreturns values too, so it's not "just names". - Source of truth: keep secrets in AWS Secrets Manager or Vault, and sync them with External Secrets Operator. Never commit them to Git; if you must keep them in Git, use Sealed Secrets or SOPS.
- In pods: mount as files rather than env vars where possible, so they don't leak in crash dumps or
envoutput. - Audit: log Secret reads in the audit policy.
Why → Encryption at rest plus tight RBAC plus an external source covers storage, access and lifecycle.
Interview tip → Point out that list on secrets exposes values; it's a common RBAC mistake.
More on Security incidents
An AWS access key for a production IAM user was pushed to a public GitHub repo 20 minutes ago. What do you do in the first 30 minutes?AdvancedYou find pods in your cluster running a crypto miner. What do you do?AdvancedA critical CVE is announced in a library you use. You have 200 images across 40 repos. How do you find and patch everything fast?IntermediateGuardDuty reports an EC2 instance talking to a known command-and-control IP. What do you do?AdvancedYou discover an S3 bucket with customer data has been public for three months. What now?IntermediateAn engineer left the company three weeks ago and you find their access key was used yesterday. How do you respond and fix the process?Beginner