Black lives matter.

We stand in solidarity with the Black community.

Racism is unacceptable.

It conflicts with the core values of the Kubernetes project and our community does not tolerate it.

go/v4-alpha (go.kubebuilder.io/v4-alpha)

Kubebuilder will scaffold using the go/v4-alpha plugin only if specified when initializing the project. This plugin is a composition of the plugins kustomize.common.kubebuilder.io/v2-alpha and base.go.kubebuilder.io/v3. It scaffolds a project template that helps in constructing sets of controllers.

It scaffolds boilerplate code to create and design controllers. Note that by following the quickstart you will be using this plugin.

When to use it ?

  • If you are looking to scaffold Golang projects to develop projects using controllers
  • If you are looking to experiment with the future default scaffold that will be provided by Kubebuilder CLI
  • If your local environment is Apple Silicon (darwin/arm64)
  • If you are looking to use kubernetes-sigs/kustomize v4

How to use it ?

To create a new project with the go/v4-alpha plugin the following command can be used:

kubebuilder init --domain tutorial.kubebuilder.io --repo tutorial.kubebuilder.io/project --plugins=go/v4-alpha

Subcommands supported by the plugin

  • Init - kubebuilder init [OPTIONS]
  • Edit - kubebuilder edit [OPTIONS]
  • Create API - kubebuilder create api [OPTIONS]
  • Create Webhook - kubebuilder create webhook [OPTIONS]

Further resources

  • To see the composition of plugins, you can check the source code for the Kubebuilder main.go.
  • Check the code implementation of the [base Golang plugin base.go.kubebuilder.io/v3][v3-plugin].
  • Check the code implementation of the Kustomize/v2-alpha plugin.
  • Check controller-runtime to know more about controllers.