Repository layout

Different providers may differ in their directory layout. Beginning with the move to using CRDs and kubebuilder the general layout follows that defined by the kubebuilder project.

Go package Structure


The cmd package contains the manager main program. Manager is responsible for initializing shared dependencies and starting / stopping Controllers.

The cmd package also contains the shared clusterctl.


The pkg/apis/... packages contains the API resource definitions. Users edit the *_types.go files under this directory to implement their API definitions.

Each resource lives in a pkg/apis/<api-group-name>/<api-version-name>/<api-kind-name>_types.go file.


The controller package instantiates Cluster API controllers with provider specific Actuators.

Additional directories and files

In addition to the packages above, a Kubebuilder project has several other directories and files.


A Makefile is created with targets to build, test, run and deploy the controller artifacts for development as well as production workflows


A Dockerfile is scaffolded to build a container image for your Manager.


Kubebuilder creates yaml config for installing the CRDs and related objects under config/.

  • config/crds
  • config/rbac
  • config/manager
  • config/samples

API reference documentation, user defined API samples and API conceptual documentation go here.

results matching ""

    No results matching ""