Skip to main content
InterviewHubPRO
Section Overview
Q24

Question 24 of 50

Part 2: ArgoCD at Scale & Progressive Delivery (Mid-Level)

48%
GitOps & ArgoCD (50 Qs)•Part 2: ArgoCD at Scale & Progressive Delivery (Mid-Level)

How do you handle database migrations safely in GitOps?

senior LevelDatabases & SQL

In Simple Words: Database migrations are stateful and irreversible, while GitOps is designed for declarative, repeatable states.

  • Run database migrations inside an ArgoCD PreSync Kubernetes Job.
  • Ensure all database schema changes are backward-compatible (expand before contract).
  • If the PreSync migration Job fails, ArgoCD stops the sync immediately, preventing the new application pods from ever deploying!