Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
K

kubebuilder

> 云原生
Open source

Kubebuilder - SDK for building Kubernetes APIs using CRDs

9.3K stars0 likes7 views
WebsiteGitHub

About

Kubebuilder - SDK for building Kubernetes APIs using CRDs

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.

Kubebuilder is developed on top of the controller-runtime and controller-tools libraries.

Kubebuilder is also a library

Kubebuilder is extensible and can be used as a library in other projects. Operator-SDK is a good example of a project that uses Kubebuilder as a library. 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.

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

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

Scope

Building APIs using CRDs, Controllers, and Admission Webhooks.

Philosophy

See DESIGN.md for the guiding principles of the various Kubebuilder projects.

TL;DR:

Provide clean library abstractions with clear and well-exampled go docs.

  • Prefer using go interfaces and libraries over-relying on code generation
  • Prefer using code generation over 1 time init of stubs
  • Prefer 1 time init of stubs over forked and modified boilerplate
  • Never fork and modify boilerplate

Techniques

  • Provide higher-level libraries on top of low-level client libraries
    • Protect developers from breaking changes in low-level libraries
    • Start minimal and provide progressive discovery of functionality
    • Provide sane defaults and allow users to override when they exist
  • Provide code generators to maintain common boilerplate that can't be addressed by interfaces
    • Driven off of // + comments
  • Provide bootstrapping commands to initialize new packages

Versioning and Releasing

See VERSIONING.md.

Troubleshooting

  • Bugs and Feature Requests:

    If you have what looks like a bug, or you would like to make a feature request, please use the Github issue tracking system. Before you file an issue, please search existing issues to see if your issue is already covered.

  • Slack

    For real-time discussion, you can join the #kubebuilder slack channel. Slack requires registration, but the Kubernetes team is an open invitation to anyone to register here. Feel free to come and ask any questions.

Contributing

Contributions are greatly appreciated. The maintainers actively manage the issues list and try to highlight issues suitable for newcomers. The project follows the typical GitHub pull request model. See CONTRIBUTING.md for more details. Before starting any work, please either comment on an existing issue or file a new one.

Operating Systems Supported

Currently, Kubebuilder officially supports macOS and Linux platforms. If you are using a Windows OS, we recommend you read the instructions in here.

Contributions towards supporting Windows are not planned.

Versions Compatibility and Supportability

Projects created by Kubebuilder contain a Makefile that installs tools at versions defined during project creation. The main tools included are:

  • kustomize
  • controller-gen
  • setup-envtest

Additionally, these projects include a go.mod file specifying dependency versions. Kubebuilder relies on controller-runtime and its Go and Kubernetes dependencies. Therefore, the versions defined in the Makefile and go.mod files are the ones that have been tested, supported, and recommended.

Each minor version of Kubebuilder is tested with a specific minor version of the client-go. While a Kubebuilder minor version may be compatible with other client-go minor versions, or other tools this compatibility is not guaranteed, supported, or tested.

The minimum Go version required by Kubebuilder is determined by the highest minimum Go version required by its dependencies. This is usually aligned with the minimum Go version required by the corresponding k8s.io/* dependencies.

Compatible k8s.io/* versions, client-go versions, and minimum Go versions can be found in the go.mod file scaffolded for each project for each tag release.

Example: For the 4.1.1 release, the minimum Go version compatibility is 1.22. You can refer to the samples in the testdata directory of the tag released v4.1.1, such as the go.mod file for project-v4. You can also check the versions of the tools supported and tested for this release by examining the Makefile.

Community Meetings

The following meetings happen biweekly:

  • Kubebuilder Meeting

You are more than welcome to attend. For further info join to [email protected]. Every month, our team meets on the first Thursday at 11:00 PT (Pacific Time) to discuss our progress and plan for the upcoming weeks. Please note that we have been syncing more frequently offline via Slack lately. However, if you add a topic to the agenda, we will hold the meeting as scheduled. Additionally, we can use this channel to demonstrate new features.

Issues· 74 open

View all issuesOpen on GitHub
  • #6062

    (go/v4, helm/v2-alpha): document and support turning off the health probe server

    Updated Sep 29, 2026
  • #6061

    (go/v4): replace ENABLE_WEBHOOKS with --webhook-port=-1 to run the manager without webhooks

    Updated Sep 27, 2026
  • #6059

    CronJob tutorial: old successful Job cleanup does not ignore NotFound errors

    kind/bugkind/documentationUpdated Sep 27, 2026
  • #6058

    CLI: remaining gaps after the PROJECT read fixes (#5845, #5942, #6030)

    kind/bugUpdated Sep 26, 2026
  • #6049

    kubebuilder alpha update not working locally or via GHA

    kind/bugUpdated Sep 15, 2026
  • #6021

    helm/v2-alpha: the generated chart exposes metrics values the manager never receives

    kind/bugUpdated Sep 13, 2026
  • #5910

    helm/v2-alpha: support multiple deployments and sidecar containers in generated charts

    kind/featurehelmhelm/v2-alphaUpdated Sep 7, 2026
  • #5999

    Broken links in the Kubebuilder Book

    Updated Sep 2, 2026
  • #5977

    deploy-image: image reference is parsed by hand and produces invalid version labels

    Updated Aug 14, 2026
  • #5976

    Redesign manager env values in helm/v2-alpha

    Updated Aug 14, 2026

> Tags

Gok8s-sig-api-machinery

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 29, 2026
Category云原生
PricingOpen source

> Related tools

K
Kubernetes
容器编排事实标准
H
Helm
Kubernetes 包管理器
S
seaweedfs
SeaweedFS is a distributed storage system for object storage (S3), file systems, and Iceberg tables,