Free Online Course · Self-paced

Kubernetes Operator Tutorial - Build Production-Ready Operators

Free, hands-on Kubernetes Operator tutorial that takes you from the reconcile loop and CRDs all the way to a production-grade controller with leader election, admission webhooks, Prometheus metrics, and OLM packaging. 28 lessons across 9 chapters, every example built on controller-runtime, kubebuilder, and Operator SDK and tested on real kind / Minikube clusters.

  • 28 parts
  • ~475 min total
  • Intermediate to Advanced
  • Updated Jun 2026
Kubernetes Operator Tutorial - Build Production-Ready Operators
By Last updated

This Kubernetes Operator tutorial takes you from the reconcile loop and Custom Resource Definitions all the way to a production-grade controller with leader election, admission webhooks, Prometheus metrics, and an OLM bundle ready for OperatorHub. Across 28 lessons in 9 chapters, every example is built on the standard stack — controller-runtime, kubebuilder, and Operator SDK — and tested on real kind and Minikube clusters.

Start with Chapter 1 if Operators are new to you. We begin with what an Operator actually is, how it differs from a plain controller and from a CRD, and the reconcile loop that powers every Operator on the planet. By the end of Chapter 5 you understand the full conceptual stack — CRDs, controller-runtime internals, finalizers, owner references, drift detection, Server-Side Apply — and have everything you need to read or audit any open-source Operator on GitHub.

Chapter 6 adds admission webhooks; Chapter 7 covers the production concerns that decide whether an Operator survives in a real cluster — RBAC scoping, leader election, health probes, Prometheus metrics, and multi-tenancy. Chapters 8 and 9 then walk through two of the lower-friction paths to shipping an Operator: pure Helm-based Operators (when your day-2 logic is light) and hybrid Helm + Go Operators (when you need Helm's templating but Go's reconciliation).

If you already understand the basics, jump straight to any chapter — each lesson is self-contained but the order is designed to build on the previous topic.

Click Start the course to begin with "What is a Kubernetes Operator?", or use the syllabus to skip directly to the chapter you need.

What you'll learn

  • Understand the Operator pattern end-to-end - reconcile loop, CRDs, design patterns, maturity model
  • Write CRDs with OpenAPI v3 validation, status subresource, conversion webhooks, and admission webhooks
  • Implement controllers with controller-runtime - watches, predicates, finalizers, owner references, SSA
  • Apply production patterns - RBAC scoping, leader election, multi-tenancy, Prometheus metrics, health probes
  • Choose between Helm-based, Go-based, and hybrid Operator approaches with full working examples
  • Package and ship to OperatorHub with an OLM bundle that targets a clear capability level

Prerequisites

  • Comfortable with Kubernetes basics - pods, deployments, services, kubectl, YAML
  • A workstation that can run kind / Minikube (8 GB RAM minimum, 16 GB recommended)
  • Working knowledge of Go (for the controller-runtime and Operator SDK chapters)
  • Familiarity with Helm (for the Helm-based and hybrid Operator chapters)

Syllabus

9 chapters · 28 lessons · ~475 min of reading

  1. 1 Operator Foundations 6 lessons
    1. Part 1 What is a Kubernetes Operator? 12 min read
    2. Part 2 Kubernetes Operator vs Controller vs CRD 10 min read
    3. Part 3 Desired state vs actual state (level-triggered model) 11 min read
    4. Part 4 The Kubernetes reconcile loop explained 15 min read
    5. Part 5 Operator design patterns - Singleton, Capability, Lifecycle, Auto-Pilot 16 min read
    6. Part 6 Operator capability levels I-V (maturity model) 16 min read
  2. 2 Custom Resource Definitions (CRDs) 2 lessons
    1. Part 7 Kubernetes CRDs explained - a complete guide 13 min read
    2. Part 8 CRD version upgrades and conversion webhooks 17 min read
  3. 3 controller-runtime Internals 5 lessons
    1. Part 9 controller-runtime architecture - Manager, Cache, Informer, Workqueue 12 min read
    2. Part 10 Watches, events, and predicates 14 min read
    3. Part 11 Status subresource and conditions (KEP-1623) 18 min read
    4. Part 12 Finalizers - two-phase deletion and cleanup 18 min read
    5. Part 13 Owner references and garbage collection 13 min read
  4. 4 Setting Up Your Development Environment 1 lesson
    1. Part 14 Install Operator-SDK on Linux (Go, kubectl, Helm 4, kind, ttl.sh) 15 min read
  5. 5 Reconciliation Patterns 3 lessons
    1. Part 15 Multi-resource reconciliation - managing N child resources per CR 18 min read
    2. Part 16 Drift detection patterns - periodic resync vs spec diffing 14 min read
    3. Part 17 Server-Side Apply (SSA) in Kubernetes operators 24 min read
  6. 6 Admission Webhooks 1 lesson
    1. Part 18 Mutating and validating admission webhooks 18 min read
  7. 7 Production Operations 5 lessons
    1. Part 19 Operator RBAC - ClusterRole, kubebuilder markers, audit 13 min read
    2. Part 20 Leader election - HA operators with lease locks 15 min read
    3. Part 21 Health and readiness probes (/healthz, /readyz) 16 min read
    4. Part 22 Prometheus metrics for operators 13 min read
    5. Part 23 Multi-tenant Operator patterns - per-namespace leases and listers 15 min read
  8. 8 Helm-Based Operators 3 lessons
    1. Part 24 Helm-based Operator Part 1 - chart, CRD, watches.yaml 31 min read
    2. Part 25 Helm-based Operator Part 2 - lifecycle, drift, hooks, scope 30 min read
    3. Part 26 Helm-based Operator vs Flux vs Argo CD 10 min read
  9. 9 Hybrid Helm + Go Operators 2 lessons
    1. Part 27 Hybrid Operator Part 1 - build the foundation (Go + Helm v4 SDK) 34 min read
    2. Part 28 Hybrid Operator Part 2 - custom status, finalizer, drift, cross-CR 24 min read
Deepak Prasad

R&D Engineer

Founder of GoLinuxCloud with over a decade of expertise in Linux, Python, Go, Laravel, DevOps, Kubernetes, Git, Shell scripting, OpenShift, AWS, Networking, and Security. With extensive experience, he excels across development, DevOps, …

  • Red Hat Certified System Administrator in Red Hat OpenStack
  • Certified Kubernetes Application Developer (CKAD)
  • Red Hat Certified Specialist in Ansible Automation
  • Go (programming language)
  • Python (programming language)
  • DevOps
  • Computer Security