kubegen

Crates.iokubegen
lib.rskubegen
version0.1.0
created_at2026-01-22 11:12:10.117262+00
updated_at2026-01-22 11:12:10.117262+00
descriptionA CLI tool for scaffolding Kubernetes operators in Rust using kube-rs
homepage
repositoryhttps://github.com/bobbyiliev/kubegen-cli
max_upload_size
id2061371
size433,097
Bobby Iliev (bobbyiliev)

documentation

README

kubegen

kubegen is a Rust based CLI for scaffolding Kubernetes operators using kube-rs.

Think Kubebuilder, but for Rust.

Goals

  • 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

What kubegen does

  • Scaffold a new Rust operator project
  • Generate CRDs and Rust types
  • Create reconciliation boilerplate
  • Optionally add metrics and webhooks

Non goals

  • Providing a runtime framework
  • Abstracting Kubernetes concepts
  • Managing operator lifecycle after generation

Project status

Early development. APIs and templates may change.

Installation

From crates.io (Recommended)

cargo install kubegen

Homebrew (macOS/Linux)

brew tap bobbyiliev/kubegen
brew install kubegen

Download Binary

Download 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.

Build from Source

git clone https://github.com/bobbyiliev/kubegen-cli.git
cd kubegen-cli
cargo build --release
# Binary will be at target/release/kubegen

Usage

kubegen new my-operator
kubegen add crd MyResource
kubegen add metrics
kubegen add webhook MyResource

Contributing

Focused and atomic PRs only.

Every feature should include:

  • Implementation
  • Tests
  • Documentation if user facing

See CONTRIBUTING.md for details.

Commit count: 150

cargo fmt