There are several tasks that have to be completed before a workload cluster can be created.
Cluster API requires an existing Kubernetes cluster accessible via kubectl. During the installation process, the Kubernetes cluster will be transformed into a management cluster by installing the Cluster API provider components, so it is recommended to keep it separated from any application workload.
It is a common practice to create a temporary, local bootstrap cluster, which is then used to provision a target management cluster on the selected infrastructure provider.
For production use, a “real” Kubernetes cluster should be used with appropriate backup and Disaster Recovery policies and procedures in place. The Kubernetes cluster must be of a supported version.
kind can be used for creating a local Kubernetes cluster for development environments or for the creation of a temporary bootstrap cluster used to provision a target management cluster on the selected infrastructure provider.
Please use the instructions in the official Cluster API docs, or use this command: make clusterctl
Now that we’ve got clusterctl installed and all the prerequisites are in place, we can transform the Kubernetes cluster into a management cluster by using the clusterctl init command. More information about clusterctl can be found here.
For the latest version:
Or for a specific version: --infrastructure hetzner:vX.X.X
For a list of all variables needed for generating a cluster manifest (from the cluster-template.yaml), use clusterctl generate cluster --infrastructure hetzner:<caph-version> --list-variables hetzner-cluster
In order for the provider integration hetzner to communicate with the Hetzner API (HCloud API), we need to create a secret with the access data. The secret must be in the same namespace as the other CRs.
export HCLOUD_TOKEN="<YOUR-TOKEN>"
The secret name and the tokens can also be customized in the cluster template.
In order for the provider integration hetzner to communicate with the Hetzner API (HCloud API + Robot API), we need to create a secret with the access data. The secret must be in the same namespace as the other CRs.
The secret name and the tokens can also be customized in the cluster template.
See node-image for more information.