kubegen is a Rust based CLI for scaffolding Kubernetes operators using kube-rs.
Think Kubebuilder, but for Rust.
- Make writing Kubernetes operators in Rust approachable
- Generate production ready scaffolding
- Follow kube-rs best practices
- Keep generated code explicit and owned by the user
- Scaffold a new Rust operator project
- Generate CRDs and Rust types
- Create reconciliation boilerplate
- Optionally add metrics and webhooks
- Providing a runtime framework
- Abstracting Kubernetes concepts
- Managing operator lifecycle after generation
Early development. APIs and templates may change.
cargo install kubegenbrew tap bobbyiliev/kubegen
brew install kubegenDownload the latest release for your platform from the releases page.
Linux (x86_64)
curl -LO https://github.com/bobbyiliev/kubegen-cli/releases/latest/download/kubegen-x86_64-unknown-linux-gnu.tar.gz
tar xzf kubegen-x86_64-unknown-linux-gnu.tar.gz
sudo mv kubegen /usr/local/bin/macOS (Apple Silicon)
curl -LO https://github.com/bobbyiliev/kubegen-cli/releases/latest/download/kubegen-aarch64-apple-darwin.tar.gz
tar xzf kubegen-aarch64-apple-darwin.tar.gz
sudo mv kubegen /usr/local/bin/macOS (Intel)
curl -LO https://github.com/bobbyiliev/kubegen-cli/releases/latest/download/kubegen-x86_64-apple-darwin.tar.gz
tar xzf kubegen-x86_64-apple-darwin.tar.gz
sudo mv kubegen /usr/local/bin/Windows
Download kubegen-x86_64-pc-windows-msvc.zip from the releases page and add to your PATH.
git clone https://github.com/bobbyiliev/kubegen-cli.git
cd kubegen-cli
cargo build --release
# Binary will be at target/release/kubegenkubegen new my-operator
kubegen add crd MyResource
kubegen add metrics
kubegen add webhook MyResourceFocused and atomic PRs only.
Every feature should include:
- Implementation
- Tests
- Documentation if user facing
See CONTRIBUTING.md for details.