Interview Prep/CI/CD/Secrets and Credentials

How do you manage application secrets from build to runtime?

IntermediateProductionSecrets and Credentials
Answer

Keep secrets out of the image and out of Git. Build-time secrets (private registry token) are passed with BuildKit --secret so they never land in a layer. Runtime secrets are fetched by the platform: External Secrets Operator or the Secrets Store CSI driver syncing from AWS Secrets Manager/Vault into Kubernetes, or IRSA/Workload Identity so the app reads the secret manager directly. The pipeline only references secret names, never values.

docker build --secret id=npmrc,src=$HOME/.npmrc -t api:$GIT_SHA .
# Dockerfile: RUN --mount=type=secret,id=npmrc,target=/root/.npmrc npm ci
All CI/CD questions

More on Secrets and Credentials