-
- Why Another Book About Controllers?
- Who this book is for
- What you can take away
- One case study, not a database platform
- How to follow the argument
- Read evidence at its stated strength
- Part I
- When Not to Build an Operator
- Find the point where responsibility ends
- Choose the control model separately from the hosting model
- Decide whether Kubernetes should be the product API
- A dashboard edit can be a dispute about authority
- Do not use admission as a shortcut to realization
- Two shortcuts that change the promise
- Account for the cost after the first successful create
- Make the choice conditional and reviewable
- A Reconciler Is Not an Event Handler
- The trigger is not the instruction
- Current intent is not a history of commands
- Start a new comparison, not an imaginary fresh snapshot
- Separate the request's identity from an attempt
- Progress needs another observation
- A satisfied promise should become quiet
- Review the decision without its original event
- Designing Before Scaffolding
- Bound the promise before choosing its fields
- Assign authority before automating correction
- Define the first effect's recovery contract
- Keep an open decision from becoming a default
- Start with one incomplete but actionable record
- Investigate the uncertainty at the right cost
- Let the record decide what is ready
- Part II
- APIs Are Promises
- Acceptance is the start of an obligation
- Omission assigns a decision to someone
- An abstraction moves the cost of change
- Legal values do not define legal transitions
- Clients depend on more than spec
- Alpha still leaves users with stored objects
- Publish only the promises you can explain
- Spec, Status, and the Boundary Between Them
- Separate the request from the report
- Kubernetes protects the write boundary, not the truth
- Give each report a desired state revision
- Keep identity when intent changes
- Freshness is narrower than certainty
- Verify the author of each claim
- Read the report before acting on it
- Conditions That Tell the Truth
- Write the sentence before selecting the value
- Unknown is not False
- A green conclusion needs the right generation
- Keep one current conclusion, not a history
- Preserve the meaning of transition time
- Make explanations safe for their readers
- Let the conclusion guide action, not invent it
- Defaulting, Validation, and Immutability
- Match the rule to the evidence
- A default must survive the controller that chose it
- Validate the promised output before creating its cost
- An allowed value can still be a forbidden change
- A webhook spends write path availability
- Test rejection without guessing its cause
- Place the rule, then name what remains
- Ownership Is Part of the API
- Same address, different owner
- A reference states a relationship, not a permission
- Do not let a helper decide adoption
- Adoption changes who is responsible
- Deletion follows more than one boundary
- Match confidence to the mechanism
- Resolve collisions without stealing ownership
- Security and Multi-Tenant Boundaries
- Follow the credential that performs the effect
- Do not let intent choose its own authority
- Scope the actual request, not the role's name
- Secret ownership does not confine readers
- Limit each credential's reach
- Choose isolation from the loss you can tolerate
- Hardening is not delegated authority
- A denied effect can still disclose a credential
- Prove a boundary with an allowed and denied path
- Part III
- One Safe Step Across Independent Systems
- Give partial success a legitimate next state
- Choose the boundary where recovery changes
- Small steps do not make unsafe effects repeatable
- Acceptance is a state worth observing
- Returning requires a route back
- A timeout ends the wait, not the operation
- Changed intent does not rewrite accepted history
- Cleanup has the same independent commits
- Compensation is another effect
- Review the state left after interruption
- Idempotency Under Retry
- The gap no status write can close
- Decide what must remain the same
- Agree on the meaning of a repeated request
- When the user's request changes during recovery
- A conflict followed by “not found” is still uncertainty
- The provider contract determines what you can promise
- Approve the recovery story, not the retry loop
- The Cache Is Not the API Server
- Identify the path before trusting the result
- A synchronized cache is not a frozen world
- Separate lag from exclusion
- Use evidence already returned by the write
- Spend a direct read on a named decision
- A consistency option has a limited scope
- Test the window, not a lucky delay
- Diagnose before bypassing
- Concurrency Without Wishful Thinking
- The queue is not the boundary of the system
- Make the write conditional on its premise
- Refresh the decision, not just the token
- Spec and status are not separate objects
- A checkpoint conflict does not undo the provider
- Keep ownership checks attached to the write
- Narrow patches still need correct reasoning
- Protect the invariant where it is committed
- Approve the guard and its failure path
- Work Queues, Backoff, and Requeue Decisions
- A notification is not the work itself
- Coalescing is useful; forgotten work is not
- Choose a cause, then choose the return path
- Pending work should not acquire failure history
- “Wait for change” must name a working path
- A scheduled attempt is not a deadline guarantee
- Close every incomplete step with its next cause
- Errors Are State Too
- Classify the obstacle, not the error's spelling
- Typed evidence still needs operation context
- Carry a safe explanation and an inspectable cause
- Recovery and readiness are separate conclusions
- A repair path must return control to the resource
- Tell each audience the fact it can use
- Cleanup failure is still unfinished cleanup
- Make the next decision possible
- Finalizers and the Long Goodbye
- A finalizer preserves an obligation, not a callback
- Accept the cleanup promise before the external effect
- Deletion takes priority over ordinary realization
- Acceptance of deletion is not completion
- “Not found” can still mean “not yet visible”
- A stuck deletion can be the truthful result
- Test the release boundary, not only the metadata edit
- Release responsibility only with a reason you can name
- Part IV
- Choose Evidence That Can Disprove the Claim
- Separate the decision from its premises
- Let the owner of the rule enforce it
- Select the smallest environment with the missing mechanism
- Real components still have a configuration and an identity
- Observe a particular change, not merely “something happened”
- Assert the protocol, not incidental choreography
- Coverage cannot choose the missing case
- Write the claim with its boundary attached
- Testing Time, Failure, and Restart
- Draw the state that survives
- Interrupt a named commit, not “somewhere during create”
- Make uncertainty survive replacement too
- Time belongs inside an explicit boundary
- A timer is not a recovery record
- Check safety before celebrating progress
- Add the next real boundary deliberately
- Approve reconstruction, not a second invocation
- From Local Cluster to Production Evidence
- Test the package, not a second copy of the source
- Isolation is part of trustworthy evidence
- Authorization evidence needs the right principal
- A protocol result is more informative than “the probe failed”
- Let cluster controllers supply cluster controller evidence
- Separate a running manager from a functioning product
- A leadership handoff is not exclusion of effects
- Turn a passing run into a bounded release claim
- Match verification effort to risk
- Preserve the inputs to the next release decision
- Authorize a scope, not a test label
- Part V
- Observability for a Converging System
- Keep attempt outcomes separate from resource truth
- Report effects and checkpoints separately
- Choose the signal that supports the decision
- Start with the counters already available
- Do not invent a clock the API does not contain
- Treat diagnostic fields as delegated access
- Record transitions without manufacturing noise
- Trace the attempt without publishing the lifetime
- Page for a decision, and verify that the page can arrive
- Make every signal earn its cost
- Throughput, Hot Loops, and Backpressure
- Identify the boundary before choosing its control
- Read pressure together with progress
- Remove work the controller creates for itself
- Use arithmetic to challenge an expectation
- Spread observations without inventing capacity
- Put the budget around the scarce effect
- Protect cleanup without starving other work
- Account for the memory that waiting retains
- Recovery must survive the disappearance of pressure
- Add workers only after locating useful headroom
- APIs Must Survive Their First Version
- Preserve meaning, not merely field names
- Serving and storage are separate commitments
- Conversion cannot recover discarded information
- Review the change against old actors
- Treat stored version status as a claim to maintain
- Retire a version only when its obligations have moved
- Know what the existing experiment establishes
- Approve the promise before approving the schema
- Shipping Changes Without Breaking Control
- Identify the write that changes rollback
- A Pod template is only one release artifact
- Derive the order from dependencies
- Readiness is not a compatibility gate
- Leadership does not close the external overlap window
- Make the new release resume unfinished obligations
- Preserve the work as well as its identity
- Decide rollback from the state that exists now
- Qualify a real release pair
- Ship the compatible reader before the new obligation
- The 03:00 Runbook
- Preserve the facts that intervention could erase
- Inspect narrowly and keep the evidence protected
- State what is known before choosing a cause
- Locate the missing transition
- Test the disputed authority, not the administrator's access
- Choose the smallest authorized state change
- Keep uncertainty visible when waiting expires
- Prove recovery where progress was blocked
- Escalate one answerable question
- Part VI
- Reviewing a Reconciler
- Establish what the implementation is allowed to promise
- Follow one lost response through a changed request
- Turn the trace into a finding someone can close
- Cross deletion with work already in flight
- Challenge apparent success with a foreign object
- Ask where the next attempt comes from
- Require evidence at the boundary the finding crosses
- Give the change a usable verdict
- A Controller Another Team Can Own
- Transfer a responsibility, not a label
- Give the receiver a route to the next decision
- Rehearse one unresolved lifetime
- Add the pressure that makes shortcuts attractive
- Test whether the team can change what it inherits
- Record a bounded acceptance
- Give remaining obligations an exit
- Let capability, not the calendar, finish the handover
- Appendices
- Appendix A: Controller Design Record Template
- How to keep the record usable
- Record identity and approval scope
- Promise and authority
- Protocol and interruption record
- Effect entry
- Waiting and failure policy
- Cleanup and release of responsibility
- Operating envelope
- Evidence entries
- Change, transfer, and retirement
- Unified decision and gap register
- Example entry: resize is not create replay
- Approval for the next bounded step
- Source Notes
- Why Another Book About Controllers?
The Reconciler's Handbook
Designing, Reviewing, and Owning Kubernetes Controllers
A controller is a promise you keep making.
Learn when to build one, how to design for failure, and what it takes to own it.
Minimum price
$19.99
$29.99
You pay
Author earns
About
About the Book
A controller can create a database. Who keeps the promise after that?
A response is lost and the next retry creates a second resource. An emergency dashboard change disappears when reconciliation restores declared state. Deletion stalls, a rollback cannot interpret a new checkpoint, or the only engineer who understands recovery leaves the team.
These are not just implementation problems. They expose decisions about identity, authority, evidence, and responsibility.
This book starts before scaffolding: does the work need continuous ownership, or would a Job, workflow, existing platform, or standalone service meet the need? If a controller is justified, what promise is the team prepared to automate and keep?
Through one fictional ManagedDatabase case study, the book connects design choices to their consequences under retries, stale observations, concurrent changes, partial failure, deletion, and upgrades. The same resource follows the argument from its API contract to incident response and eventual handover.
You will learn to:
- choose a control model and decide whether Kubernetes should be the public API
- define who may change desired and external state, and what status can truthfully report
- preserve operation identity across lost responses without confusing retries with new work
- design recovery around independent commits, cache lag, write conflicts, and reliable wake up paths
- retain cleanup responsibility until the evidence permits its release
- select tests and experiments that can challenge a claim, not merely repeat its assumptions
- connect observability, backpressure, compatibility, and runbooks to operational decisions
- review a reconciler through interrupted executions and transfer responsibility through demonstrated capability
Written for experienced engineers, Principal Engineers, platform architects, operators, and technical leaders, the book assumes familiarity with Kubernetes workloads and basic API concepts. It does not require Go proficiency or access to the companion repository.
Short snippets and diagrams make failure mechanisms concrete. Linked Source Notes provide primary references and bounded experimental evidence. Optional Go examples let implementers inspect those experiments; they are supporting material, not a complete production operator. A copyable Controller Design Record helps turn the reasoning into decisions, owners, evidence, and explicit conditions for proceeding.
This is not a scaffolding tutorial or a catalogue of universal best practices. It is a guide to deciding what may safely happen next, what must be learned first, and who remains responsible when automation cannot finish the job.
Feedback
Author
About the Author
Luca Sepe is a platform architect and software engineer focused on Kubernetes APIs, controllers, control planes, and Go infrastructure software.
He has worked in software engineering since 1999 across backend systems, cloud integrations, observability, media platforms, infrastructure automation, and Kubernetes native products. His books turn that experience into practical guides for engineers who need to understand not only how a mechanism works, but also its contracts, failure modes, and operational tradeoffs.
Luca also provides fixed-scope, primarily asynchronous architecture reviews for platform teams. Each review covers one bounded component or design decision and ends with a written assessment, prioritized next actions, and a structured handover.
- Professional profile: https://www.linkedin.com/in/lucasepe
- Code: https://github.com/lucasepe
Contents
Table of Contents
Get the free sample chapters
Click the buttons to get the free sample in PDF or EPUB, or read the sample online here
The Leanpub 60 Day 100% Happiness Guarantee
Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
See full terms...
Earn $8 on a $10 Purchase, and $16 on a $20 Purchase
We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.
(Yes, some authors have already earned much more than that on Leanpub.)
Learn more about writing on Leanpub
Free Updates. DRM Free.
If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).
Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.
Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.
Learn more about Leanpub's ebook formats and where to read them
Write and Publish on Leanpub
You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!
Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.
Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.