Skip to main content
InterviewHubPRO
Section Overview
Q10

Question 10 of 50

Part 1: GitOps Fundamentals & Core Principles (Junior / Entry-Level)

20%
GitOps & ArgoCD (50 Qs)•Part 1: GitOps Fundamentals & Core Principles (Junior / Entry-Level)

How do Sync Phases and Sync Waves work in ArgoCD?

junior LevelCode ExamplegitopsGitOps Fundamentals

In Simple Words: By default, Kubernetes creates resources in arbitrary order. In complex architectures, database schemas must migrate before backend pods boot up, and CRDs must be created before custom resources.

  • Sync Waves (argocd.argoproj.io/sync-wave: "1"): Orders resource creation. ArgoCD synchronizes wave 0, waits for all resources to become Healthy, and only then initiates wave 1. Waves can be negative (-1) or positive (5).
yaml
apiVersion: batch/v1
kind: Job
metadata:
  name: db-migration
  annotations:
    argocd.argoproj.io/sync-wave: "-1" # Runs BEFORE app deployment