Kubernetes Operators: Handle multiple controllers, conflicts and retries like a pro

When multiple Kubernetes controllers update the same custom resource, you WILL hit conflict errors. Your operator caches an old resource version, another controller updates the object, and your update fails — "the object has been modified, please apply your changes to the latest version." In this video, Shubham walks you through a real-world scenario of building a custom autoscaler with two operators (NodePool + Autoscaler) sharing the same CRD, and shows exactly why and how resource version conflicts happen. Shubham Katara -   / shubhamkatara   You'll learn: ✅ Resource Version vs Generation — what changes when ✅ Why multiple controllers sharing CRDs causes conflicts ✅ The Lazy Way — return error, let Kubernetes re-run the reconciler (wasteful!) ✅ The Pro Way — retry.RetryOnConflict() with exponential backoff & jitter ✅ Kubernetes apierrors package: IsConflict, IsNotFound ✅ Configuring backoff: Steps, Duration, Factor, and Jitter ✅ When you need retry vs when you don't This is Part 2 of the Kubernetes Operators Best Practices series on KubeSimplify. --- Timestamps: 0:00 - Introduction 0:50 - Concept before problem statement 1:07 - Resource Version vs Generation explained (demo) 4:11 - Problem: Building a custom autoscaler operator 5:18 - Designing the NodePool custom resource 8:49 - Adding a second controller for autoscaling 11:16 - One operator, multiple controllers & CRDs 15:30 - Operators interacting with each other's CRs 17:31 - Timeline: when two operators touch the same CR 23:44 - The conflict problem explained 27:24 - What is a conflict error in Kubernetes 29:51 - Two fixes: Lazy Way vs Pro Way 30:38 - Code walkthrough: reconciler setup 38:19 - The Lazy Way: return error, re-run reconciler 42:06 - Dev setup: vCluster vind (vCluster in Docker) 44:47 - Demo: Lazy way conflict 49:41 - The Pro Way: apierrors package 55:21 - client-go retry package 57:48 - retry.RetryOnConflict() with DefaultBackoff 58:08 - Backoff: Steps, Duration, Factor & Jitter 1:05:02 - Error patterns: IsConflict, IsNotFound, catch-all 1:08:58 - Demo: Pro way retry in action 1:10:52 - Summary & when to use retry 1:12:13 - Outro Related Videos: Kubernetes Operator Best Practice: Stop Infinite Reconcile Loops -    • Kubernetes Operator Best Practice: Stop In...   Master Kubernetes operators with kubebuilder -    • Master Kubernetes Operators with Kubebuilder   🔗 Resources: client-go retry package: k8s.io/client-go/util/retry apimachinery errors: k8s.io/apimachinery/pkg/api/errors vCluster vind: https://github.com/loft-sh/vind ►►►Connect with me ►►► ► Kubesimplify: https://kubesimplify.com/newsletter ► Newsletter: https://saiyampathak.com/newsletter ► Discord: https://saiyampathak.com/discord ► Twitch: https://saiyampathak.com/twitch ► YouTube: https://saiyampathak.com/youtube.com ► GitHub: https://github.com/saiyam1814 ► LinkedIn:   / saiyampathak   ► Website:   / saiyampathak   ► Instagram:   / saiyampathak   ►   / saiyampathak  

Master Kubernetes Operators with Kubebuilder
▶︎

Master Kubernetes Operators with Kubebuilder

Kubernetes Operator Best Practice: Stop Infinite Reconcile Loops
▶︎

Kubernetes Operator Best Practice: Stop Infinite Reconcile Loops

Broadcom AppNeta Webinar – Build, Deploy & Configure Your Demo Environment 20260609 1217 1
▶︎

Broadcom AppNeta Webinar – Build, Deploy & Configure Your Demo Environment 20260609 1217 1

Let’s Handle 1 Million Requests per Second, It’s Scarier Than You Think!
▶︎

Let’s Handle 1 Million Requests per Second, It’s Scarier Than You Think!

5 CLI Tools That Actually Changed How I Work in 2026
▶︎

5 CLI Tools That Actually Changed How I Work in 2026

Deploy a Production Microservices App on AWS ECS Fargate | Private Subnets, ALB & RDS PostgreSQL
▶︎

Deploy a Production Microservices App on AWS ECS Fargate | Private Subnets, ALB & RDS PostgreSQL

Kubernetes Interview Prep with Real Scenarios and Practical Demos
▶︎

Kubernetes Interview Prep with Real Scenarios and Practical Demos

Kubernetes Zero to Hero: The Complete Beginner’s Guide (2025 Edition)
▶︎

Kubernetes Zero to Hero: The Complete Beginner’s Guide (2025 Edition)

Kubernetes Operator simply explained in 10 mins
▶︎

Kubernetes Operator simply explained in 10 mins

1,000+ Tokens/Sec: Google Just Shattered the AI Speed Limit (DiffusionGemma)
▶︎

1,000+ Tokens/Sec: Google Just Shattered the AI Speed Limit (DiffusionGemma)

Kubernetes Crash Course for Absolute Beginners [NEW]
▶︎

Kubernetes Crash Course for Absolute Beginners [NEW]

Make Your Kubernetes Operator Handle 10× More Users
▶︎

Make Your Kubernetes Operator Handle 10× More Users

What's REALLY Inside a Kubernetes Service? (All 5 Types Explained)
▶︎

What's REALLY Inside a Kubernetes Service? (All 5 Types Explained)

Inside Anthropic, the $965 Billion AI Juggernaut | The Circuit
▶︎

Inside Anthropic, the $965 Billion AI Juggernaut | The Circuit

Something is jamming GPS over Europe. Here's what we found
▶︎

Something is jamming GPS over Europe. Here's what we found

John Mearsheimer & Sergey Karaganov: Atomschlag auf Europa zur Wiederherstellung der Abschreckung
▶︎

John Mearsheimer & Sergey Karaganov: Atomschlag auf Europa zur Wiederherstellung der Abschreckung

HOLY ROSARY TODAY THURSDAY, JUNE 11, 2026 ST. JUDE THADDEUS & LUMINOUS MYSTERIES | DAILY HOLY ROSARY
▶︎

HOLY ROSARY TODAY THURSDAY, JUNE 11, 2026 ST. JUDE THADDEUS & LUMINOUS MYSTERIES | DAILY HOLY ROSARY

What The Heck Are Kubernetes Resources, CRs, CRDs, Operators, etc.?
▶︎

What The Heck Are Kubernetes Resources, CRs, CRDs, Operators, etc.?

Gemma 4 Deep Dive: Local LLM with Ollama, vLLM & llama.cpp
▶︎

Gemma 4 Deep Dive: Local LLM with Ollama, vLLM & llama.cpp

Kubernetes Deployment vs. StatefulSet vs. DaemonSet
▶︎

Kubernetes Deployment vs. StatefulSet vs. DaemonSet