A team stores a 200 KB kubeconfig and certificates as secrets and hits the size limit. What do you recommend?
IntermediateScenarioSecrets, OIDC & Environments
Answer
Situation read → 48 KB secret limit, and static cluster credentials are a smell.
What I'd do →
- For EKS: OIDC to AWS and
aws eks update-kubeconfig; for AKS and GKE: the equivalent OIDC login and get-credentials. - For unavoidable files, store them in a secret manager and fetch at runtime, or encrypt the file in repo with
gpg --symmetricand keep only the passphrase as a secret.
Why → Dynamic credentials remove both the size problem and the rotation problem.
Interview tip → Mention the 48 KB limit and the encrypted-file workaround from GitHub docs.
More on Secrets, OIDC & Environments
You find AWS access keys stored as repo secrets in 25 repos. Plan the migration.IntermediateA developer asks to print a secret in the log "just once" to debug. What do you do instead?BeginnerStaging and prod need different database URLs and different AWS roles, using one workflow. How?BeginnerSecurity requires two people for prod deploys: the author cannot approve. Configure it.BeginnerWrite the AWS trust policy for a role used only by the prod deploy job of one repo.IntermediatePR workflows need read-only AWS access for `terraform plan`, including from same-repo branches. How do you set trust?Advanced