Maven / GitOps Interview Questions
What is drift detection and how does a GitOps operator handle drift?
Drift is the condition where the actual state of the cluster diverges from the desired state declared in Git. Common causes: an engineer runs kubectl scale manually during an incident, a node failure causes a deployment controller to change replica counts temporarily, or a helm upgrade is run outside the GitOps workflow. Without drift detection, these deviations are invisible until something breaks.
A GitOps operator detects drift by continuously repeating the same comparison it uses for normal syncs: it fetches the current live resources from the Kubernetes API and diffs them against the rendered desired state from Git. There is no separate "drift check" mode — drift detection is simply what happens between the commit that caused the last sync and the next one.
Argo CD marks an Application as OutOfSync when it detects drift. If selfHeal: true is set in the sync policy, Argo CD re-applies the Git state immediately, reverting the manual change. If not set, the Application stays OutOfSync and shows the diff in the UI, requiring a human to click Sync.
Flux marks its Kustomization resource as not Ready when drift occurs. With the default configuration (prune: true and a polling interval), Flux will re-apply on the next interval cycle. There is no explicit "selfHeal" toggle — Flux always reconciles on its interval.
Drift tolerance is configurable: you can tell Argo CD to ignore specific fields (like status fields managed by other controllers) using ignoreDifferences in the Application spec, preventing false-positive drift alerts from controllers that write back to managed resources.
Invest now in Acorns!!! 🚀
Join Acorns and get your $5 bonus!
Acorns is a micro-investing app that automatically invests your "spare change" from daily purchases into diversified, expert-built portfolios of ETFs. It is designed for beginners, allowing you to start investing with as little as $5. The service automates saving and investing. Disclosure: I may receive a referral bonus.
Invest now!!! Get Free equity stock (US, UK only)!
Use Robinhood app to invest in stocks. It is safe and secure. Use the Referral link to claim your free stock when you sign up!.
The Robinhood app makes it easy to trade stocks, crypto and more.
Webull! Receive free stock by signing up using the link: Webull signup.
More Related questions...
