Interview Prep/CI/CD/Deployment Strategies and GitOps

Which deployment approach for a stateful service such as a database cluster?

AdvancedScenarioDeployment Strategies and GitOps
Answer

Situation read → State changes the rules.

What I'd do →

  1. Use operators (Zalando/CloudNativePG) and StatefulSets with updateStrategy partitions, upgrading replicas first then failing over the primary.
  2. Take a verified backup/snapshot before the upgrade.
  3. Test upgrade and rollback in staging with production-like data.

Why → Data format changes may not be reversible, so backups are the real rollback.

Interview tip → Say that rollback for stateful workloads means restore.

All CI/CD questions Roadmap: CI/CD fundamentals

More on Deployment Strategies and GitOps