I kept spending 2–3 hours scaffolding Kubebuilder projects before writing any actual reconciliation logic — initializing the project, wiring the controller, configuring webhooks, setting up cert-manager, writing a Tiltfile for iteration.
So I built a Claude Code plugin that automates the repetitive setup and guides the full operator lifecycle via slash commands.
It wraps Kubebuilder and related tooling — it doesn’t replace them.
Available commands:
/k8s:prereqs - Checks and installs Go, Kubebuilder, kind, kubectl, Kustomize, Tilt.
/k8s:create-cluster - Creates a kind cluster for local development.
/k8s:create-operator - Scaffolds a controller-runtime operator including: CRD definitions, reconciliation skeleton, RBAC markers, webhook boilerplate, project layout, Tiltfile for live iteration
/k8s:dev - Starts the Tilt-based dev loop.
/k8s:verify - Validates CRDs, pods, webhooks, and cluster events.
/k8s:checklist - Runs a safety and quality checklist before shipping.
The part I care most about is the safety hook.It uses a PreToolUse hook to block kubectl/helm/kustomize commands unless the current context matches kind-*. This prevents accidental operations against non-local clusters during development — something I’ve personally seen go wrong.
Install:
claude plugin marketplace add https://github.com/Sagart-cactus/claude-k8s-plugin
claude plugin install k8s@sagart-devtools
GitHub: https://github.com/Sagart-cactus/claude-k8s-pluginI built this partly to learn Claude Code’s plugin system, and partly because I needed it while building OptiPod (a GitOps-safe Kubernetes resource rightsizing operator).
Happy to answer questions about:
- Claude plugin architecture - The hook system - Kubebuilder automation patterns - or operator lifecycle design.