kube-rs: Building Kubernetes Controllers in Rust cover

Technology · Ebook

kube-rs: Building Kubernetes Controllers in Rust

by Shriira Press

4.7(208)144 pagesPublished 2026

kube-rs is the Rust client ecosystem for Kubernetes — a CNCF sandbox project that gives Rust programs an idiomatic, type-aware way to talk to a cluster and build the controllers and operators that keep it running. At its centre is the kube crate, a facade over a layered client in the spirit of client-go, a runtime inspired by controller-runtime, and a derive macro for CRDs inspired by kubebuilder. This book walks the whole stack: the Api client and typed versus dynamic objects, the crate architecture, the watcher and reflector that turn the watch API into reliable local state, the Controller and its reconcile loop, the CustomResource derive macro, and the production concerns — finalizers, events, ownership, observability — that make an operator dependable.

Contents

  1. 1Preface
  2. 2Chapter 1 — Why Kubernetes in Rust
  3. 3Chapter 2 — The Api Client
  4. 4Chapter 3 — Architecture of the Crates
  5. 5Chapter 4 — Watchers, Reflectors, and Stores
  6. 6Chapter 5 — The Controller and the Reconcile Loop
  7. 7Chapter 6 — Custom Resources with kube-derive
  8. 8Chapter 7 — Operators in Production
  9. 9Chapter 8 — kube-rs in Practice