Cloud / HELM Interview Questions
What is the three-way strategic merge patch and why is it important for Helm upgrades?
The three-way strategic merge patch is Helm v3's intelligent algorithm for determining exactly what changed during an upgrade, minimizing unnecessary pod restarts and resource updates.
How it works: Helm compares three versions of each resource:
- Current state - What's actually running in the cluster (live manifests)
- Previous release state - What was last deployed (saved in release secret)
- New state - What the current chart + values renders to
Why three-way matters: Two-way merge (Helm v2) only compared previous state vs new state, missing manual changes made to live resources. With three-way merge, Helm can detect:
- Changes made manually in the cluster (external modifications)
- Values that were removed from values.yaml (should be reverted)
- Fields that should not be touched (preserve cluster-specific settings)
Strategic merge patch fields: $patch: delete removes fields that would otherwise be retained. $retainKeys: [...] specifies which fields should be kept when merging.
Use with annotations: helm.sh/resource-policy: keep prevents Helm from deleting a resource during upgrade/uninstall (useful for PVCs, namespaces, CRDs).
Performance impact: Three-way merge reduces unnecessary churn - only fields that truly differ trigger updates. For deployments, this prevents rolling restarts when only labels or annotations change on non-pod template fields.
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...
