Viewing legacy documentation for Kubebuilder, check out the latest documentation instead.

[Default Scaffold] go/v4 (go.kubebuilder.io/v4)

Kubebuilder will scaffold using the go/v4 plugin only if specified when initializing the project. This plugin is a composition of the plugins kustomize.common.kubebuilder.io/v2 and base.go.kubebuilder.io/v4. 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

How to use it ?

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

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

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