Leveraging State Machines to Build Operators in Rust
summary
Shows a Rust crate that models each custom resource as an explicit state-machine API (Krator crate) and compiles transitions so invalid moves are impossible, patches Kubernetes status automatically, and runs per-object async handlers. Demo builds a toy "moose" Operator, spawns 25 mooses, logs each state transition and success, and rejects a manifest via an admission webhook when the name "george" violates the rule. Integrates tracing for structured logs, includes infallible handlers with explicit error nodes, and ships working examples and a roadmap for multi-resource watches and reconciliation tooling.
AI-written summary · about
chapters (11)
- 0:00Intro
- 0:13About me
- 0:41Background on Crestlet
- 2:09Background on other frameworks
- 5:14State Machine API
- 7:32Operator Traits
- 9:12Moose Code
- 19:18Status Updates
- 20:53Crate Updates
- 22:14Crater Roadmap
- 23:21Outro
related talks
42mCreating Operators with Rust
24mWriting Kubernetes Operators in Rust
36mLessons learned writing 10+ Kubernetes Operators - Lars Francke and Jannik Heyl
53mAutomating Stateful Applications with Kubernetes Operators
21mOperators for Beginners
24mKubernetes Operators with Go
43mLessons learned writing 10+ Kubernetes Operators
36mFunctional State Machines in Rust: Typestate and Newtype Patterns
