A deploy needs a config change in three places: Terraform, a Kubernetes ConfigMap and AWS SSM. How do you sequence it?
IntermediateScenarioDeployments and releases
Answer
Situation read → Multi-system changes fail in the gaps between systems. Order them so every intermediate state works.
What I'd do →
- Infrastructure first:
terraform planandapplyfor the new resource (a new queue or bucket) that the app will need. Existing code ignores it. - Add the new parameter to SSM and the ConfigMap with defaults that keep current behaviour.
aws ssm put-parameter --name /prod/api/queue_url --type String --value "https://sqs..." --overwrite
- Deploy the app version that reads the new config.
- Flip the behaviour (flag or config value) once everything is in place.
- Clean up old config in a later change.
- Ideally collapse this into one pipeline: Terraform outputs feed Helm values, so nobody does it by hand.
Why → Each step is independently safe and reversible; no window where the app expects something that doesn't exist.
Interview tip → Say "additive first, switch later, clean up last".
More on Deployments and releases
A deploy went out and p99 latency doubled. Walk me through it.IntermediateYou deployed a new version and half the pods are in CrashLoopBackOff. What do you do?BeginnerA release passed every test in staging but broke in production. How do you investigate?IntermediateHow would you design a zero-downtime deployment for a stateless API on Kubernetes?BeginnerEvery deploy causes a short spike of 502 errors from the ALB. Why, and how do you fix it?IntermediateHow would you set up a canary release, and what decides whether it gets promoted?Intermediate