Interview Prep/CI/CD/Deployment, Kubernetes and GitOps Failures

Argo CD sync stuck on a hook: `waiting for completion of hook batch/Job/db-migrate`.

AdvancedTroubleshootingDeployment, Kubernetes and GitOps Failures
Answer

Likely causes → Hook Job failing or never completing; old Job not deleted so name conflicts.

Diagnose → kubectl logs job/db-migrate, kubectl describe job.

Fix → Fix the job, add argocd.argoproj.io/hook-delete-policy: BeforeHookCreation.

Prevent → Idempotent migrations and backoffLimit/activeDeadlineSeconds.

All CI/CD questions Roadmap: CI/CD fundamentals

More on Deployment, Kubernetes and GitOps Failures