kubernetes-sigs /kubebuilder

Kubebuilder - SDK for building Kubernetes APIs using CRDs

★ 9,368⑂ 1,715👁 94⑃ 4,088● 1,865▤ 88
GoApache-2.0Created 2018-03-14book.kubebuilder.io
下载:v4.16.0v4.16.0 ↓4.16.02026-09-10
+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

Discussions

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, 

Snapshot: 2026-11-16T09:23:14Z · Data license Apache-2.0 · JSON