Extending Kubebuilder

Kubebuilder provides an extensible architecture to scaffold projects using plugins. These plugins allow you to customize the CLI behavior or integrate new features.

Overview

Kubebuilder’s CLI can be extended through custom plugins, allowing you to:

  • Build new scaffolds.
  • Enhance existing ones.
  • Add new commands and functionality to Kubebuilder’s scaffolding.

This flexibility enables you to create custom project setups tailored to specific needs.

Options to Extend

Extending Kubebuilder can be achieved in two main ways:

  1. Extending CLI features and Plugins: You can import and build upon existing Kubebuilder plugins to extend its features and plugins. This is useful when you need to add specific features to a tool that already benefits from Kubebuilder’s scaffolding system. For example, Operator SDK leverages the kustomize plugin to provide language support for tools like Ansible or Helm. So that the project can be focused to keep maintained only what is specific language based.

  2. Creating External Plugins: You can build standalone, independent plugins as binaries. These plugins can be written in any language and should follow an execution pattern that Kubebuilder recognizes. For more information, see Creating external plugins.

For further details on how to extend Kubebuilder, explore the following sections: