Rust Kubernetes Controller
This is an example of how easy it is to write Kubernetes controllers (operators) for Custom Resource Definitions (CRDs) in Rust. No more special generation programs, verbose configurations, and massive boilerplate... just quick and easy Kubernetes controllers.
This repository has a CRD, a CRD instance, and a simple
informer-style controller. You can build and run the code by fetching this repo and then running
The entire code is in
- Make sure you have the latest Rust installed
- Make sure you have
kubectlinstalled and configured to point to a cluster
- Download this code
kubectl create -f docs/crd.yaml
cargo runand keep it running
- Wait a moment for it to start
kubectl create -f docs/book.yaml
- Observe the output in the
cargo run, use
This will run the controller locally, rather than in-cluster.