kubernetes-sigs /kubebuilder
Kubebuilder - SDK for building Kubernetes APIs using CRDs
★ 9,368⑂ 1,715👁 94⑃ 4,088● 1,865▤ 88
+0
日增长
9,368
stars
1,715
forks
94
watchers
4,088
prs
1,865
issues
88
releases
README
Kubebuilder is a framework for building Kubernetes APIs using custom resource definitions (CRDs). Similar to web development frameworks such as Ruby on Rails and SpringBoot, Kubebuilder increases velocity and reduces the complexity managed by developers for rapidly building and publishing Kubernetes APIs in Go. It builds on top of the canonical techniques used to build the core Kubernetes APIs to provide simple abstractions that reduce boilerplate and toil. Kubebuilder does not exist as an example to copy-paste, but instead provides powerful libraries and tools to simplify building and publishing Kubernetes APIs from scratch. It provides a plugin architecture allowing users to take advantage of optional helpers and features. To learn more about this see the [Plugin section][plugin-section]. Kubebuilder is developed on top of the [controller-runtime][controller-runtime] and [controller-tools][controller-tools] libraries. Kubebuilder is also a library Kubebuilder is extensible and can be used as a library in other projects. [Operator-SDK][operator-sdk] is a good example of a project that uses Kubebuilder as a library. [Operator-SDK][operator-sdk] uses the plugin feature to include non-Go operators _e.g. operator-sdk's Ansible and Helm-based language Operators_. To learn more see [how to create your own plugins][your-own-plugins]. Installation It is strongly recommended that you use a released version. Release binaries are available on the releases page. Follow the instructions to install Kubebuilder. Getting Started See the Getting Started documentation. Also, ensure that you check out the Deploy Image Plugin. This plugin allows users to scaffold API/Controllers to deploy and manage an Operand (image) on the cluster following the guidelines and best practices. It abstracts the complexities of achieving this goal while allowing users to customize the generated code. Documentation Check out the Kubebuilder book. Resources - Kubebuilder Book: book.kubebuilder.io - GitHub Repo: kubernetes-sigs/kubebuilder - Slack channel: kubebuilder - Google Group: [email protected] - Design Documents: designs - Plugin: [plugins][plugin-section] Motivation Building Kubernetes tools and APIs involves making a lot of decisions and writing a lot of boilerplate. To facilitate easily building Kubernetes APIs and tools using the canonical approach, this framework provides a collection of Kubernetes development tools to minimize toil. Kubebuilder attempts to facilitate the following developer workflow for building APIs 1. Create a new project directory 2. Create one or more resource APIs as CRDs and then add fields to the resources 3. Implement reconcile loops in controllers and watch additional resources 4. Test by running against a cluster (self-installs CRDs and starts controllers automatically) 5. Update bootstrapped integration tests to test new fields and business logic 6. Build and publish a container from the provided Dockerfile
Top issues
#907delete api command line29 comments · 2019-07-31#5148namespace override while running make deploy17 comments · 2025-10-27#4809Proposal: Integrate kube-api-linter into Kubebuilder via golangci-lint15 comments · 2025-05-19#849Feature Gates 10 comments · 2019-07-09#5948(helm/v2-alpha): Setting manager.envOverrides to a duplicate key fails with ssa9 comments · 2026-08-04#5778Support multiple GVKs in create API9 comments · 2026-06-18#5390helm/v2-alpha: Should the generated chart support installing Custom Resources (CRs)? If so, what is the recommended mechanism?9 comments · 2026-01-25#5844[Feature] Dynamic Helm Webhook Selectors6 comments · 2026-07-06
Discussions
#5717Book Chapter on webhooks for multi version APIs is highly confusing to me1 comments · 2026-06-02#5657kubebuilder alpha update error1 comments · 2026-04-24#5630The perception that Kubebuilder is an "anti-pattern" in Go1 comments · 2026-04-16#5542Disable kustomize plugin1 comments · 2026-03-16#5524Don't fully understand Kubebuilder releases2 comments · 2026-03-01#5386Question: helm - CRDs for first installation6 comments · 2026-01-23#5365[PROPOSAL] Migrate template string constants to embedded files using `embed.FS`2 comments · 2026-01-07#5277Proposal: Shift to a library-first architecture for v54 comments · 2025-12-16
Latest release
v4.16.0 v4.16.0 2026-09-10🚀 Automation to Upgrade your Project The migration guide covers upgrading from any supported version to the latest release. For the smoothest upgrade path, use the AutoUpdate Plugin or run kubebuilder alpha update. Both use the same update logic: they regenerate your project from scratch, reapply your changes, and bring in everything listed below. Your PROJECT file needs cliVersion for this to work. Other upgrade options are mainly intended for older projects that do not yet have cliVersion in their PROJECT file. These are the paths in the migration guide: follow the AI instructions,