Build artifacts locally In order to build artifacts for the CAPI core provider, the kubeadm bootstrap provider, the kubeadm control plane provider and the Docker infrastructure provider: make docker-build REGISTRY=gcr.io/k8s-staging-cluster-api PULL_POLICY=IfNotPresent Create a clusterctl-settings.json file Next, create a clusterctl-settings.json file and place it in your local copy of Cluster API. This file will be used by create-local-repository.py. Here is an example: { "providers": ["cluster-api","bootstrap-kubeadm","control-plane-kubeadm", "infrastructure-aws" "provider_repos": ["../cluster-api-provider-aws"] } providers (Array[]String, default=[]): A list of the providers to enable. See available providers for more details. provider_repos (Array[]String, default=[]): A list of paths to all the providers you want to use. Each provider must have a clusterctl-settings.json file describing how to build the provider assets.
id: 8eec21e9b11e77f61574703c82d15fbb - page: 286
Create the local repository Run the create-local-repository hack from the root of the local copy of Cluster API: cmd/clusterctl/hack/create-local-repository.py The script reads from the source folders for the providers you want to install, builds the providers assets, and places them in a local repository folder located under $XDG_CONFIG_HOME/cluster-api/dev-repository/ . Additionally, the command output provides you the clusterctl init command with all the necessary flags. The output should be similar to: 286 von 569 04.01.24, 18:46 The Cluster API Book clusterctl local overrides generated from local repositories for the cluster-api, bootstrap-kub in order to use them, please run: clusterctl init \ --core cluster-api:v0.3.8 \ --bootstrap kubeadm:v0.3.8 \ --control-plane kubeadm:v0.3.8 \ --infrastructure aws:v0.5.0 \
id: 246dfc0e851c5b41a20afb74f81eb25f - page: 286
--infrastructure docker:v0.3.8 \ --config $XDG_CONFIG_HOME/cluster-api/dev-repository/config.yaml As you might notice, the command is using the $XDG_CONFIG_HOME/cluster-api/dev-repository/config.yaml config file, containing all the required setting to make clusterctl use the local repository. ! Warnings You must pass --config $XDG_CONFIG_HOME/cluster-api/dev-repository/config.yaml to all the clusterctl commands you are running during your dev session. The above config file changes the location of the overrides layer folder thus ensuring you dev session isnt hijacked by other local artifacts. With the only exception of the Docker provider, the local repository folder does not contain cluster templates, so the clusterctl generate cluster command will fail.
id: a669496694e6f659f10c6d7917ed6add - page: 287
Available providers The following providers are currently defined in the script: cluster-api bootstrap-kubeadm control-plane-kubeadm infrastructure-docker More providers can be added by editing the clusterctl-settings.json in your local copy of Cluster API; please note that each provider_repo should have its own 287 von 569 04.01.24, 18:46 The Cluster API Book clusterctl-settings.json describing how to build the provider assets, e.g. { "name": "infrastructure-aws", "config": { "componentsFile": "infrastructure-components.yaml",
id: d5206d625367ecc87cd908d90dc3a4df - page: 287