Loading video player...
Your Kubernetes operator reconciles one object at a time — by default. With a single worker, 100 custom resources and a 5-second reconcile means customer #100 waits over 8 minutes just to get started. In this video, Shubham shows why this happens, how the controller-runtime work queue actually processes objects, and the one-line change in your SetupWithManager that turns a sequential controller into a parallel one using MaxConcurrentReconciles. You'll see it live on an EC2Instance CRD: 10 objects processed serially with 1 worker, then the same 10 objects processed in parallel with 10 workers — and the tradeoffs of tuning that number for your workload. This video is NOT about making a single reconciliation faster — it's about making sure your users don't wait in line behind other users' objects. ━━━━━━━━━━━━━━━━━━━━━━━ ⏱ Chapters ━━━━━━━━━━━━━━━━━━━━━━━ 0:00 The problem: customers waiting in a reconcile queue 1:09 What "faster" really means for an operator 2:04 Recap: the EC2Instance custom resource 4:20 Why the problem only shows up at scale 6:35 Inside the work queue — one worker, one object 8:03 Counter analogy: why a single worker bottlenecks 9:00 The fix: tell the controller to use more workers 10:26 Walkthrough of the reconciler code 17:29 Demo with 1 worker (sequential, 5s per object) 21:28 Scaling the simulated task to 10 seconds 23:46 Setting MaxConcurrentReconciles in SetupWithManager 24:51 Demo with 10 workers (parallel) 25:42 When parallelism helps — and when it doesn't 28:03 The waiting-in-line analogy 30:20 Recap & closing ━━━━━━━━━━━━━━ 🔧 What you'll learn ━━━━━━━━━━━━━━ • How controller-runtime's work queue distributes objects to workers • Why one slow reconcile doesn't just slow down one user — it blocks everyone • How to set MaxConcurrentReconciles and pick a sensible number • Why increasing workers is NOT the same as optimizing the reconcile itself • How to think about operator scale in terms of pickup latency vs processing latency ━━━━━━━━━━━━━━━ 📺 Kubernetes Operators series ━━━━━━━━━━━━━━━ This is part of the Operator Best Practices series on KubeSimplify. If you haven't built an operator before, start with the series playlist — we build an EC2Instance operator from scratch with Kubebuilder. ▶ Playlist: https://www.youtube.com/playlist?list=PL5uLNcv9SibBMFSmXcWX7dWlhAvgAbB0A ━━━━━━━━━━━━━━━ 🧑💻 Hosts ━━━━━━━━━━━━━━━ Hosted by Shubham • Intro by Saiyam Pathak KubeSimplify — https://kubesimplify.com Like, subscribe, and share with your team — it genuinely helps the channel reach more operator developers. Questions? Drop them in the comments — Shubham reads and replies. ►►►Connect with Kubesimplify ►►► 🔗 Website: https://kubesimplify.com 📰 Newsletter: https://saiyampathak.substack.com 📖 Free E-Book (GPU+K8s): https://saiyampathak.gumroad.com/l/gpubook 💬 Discord: https://discord.gg/26Z384WSPB ► X: https://x.com/saiyampathak ► LinkedIn: https://www.linkedin.com/in/saiyampathak/ ► GitHub: https://github.com/saiyam1814 ► Instagram: https://instagram.com/saiyampathak/ 📧 Collaborations: contact@kubesimplify.com #kubernetes #cloudnative #AI