Next steps
Switching to the workload cluster#
As a next step, you need to switch to the workload cluster and the below command will do it:
export KUBECONFIG=/tmp/workload-kubeconfig
Moving components#
To move the Cluster API objects from your bootstrap cluster to the new management cluster, firstly you need to install the Cluster API controllers. To install the components with the latest version, run the below command:
clusterctl init --core cluster-api --bootstrap kubeadm --control-plane kubeadm --infrastructure hetzner
Note
For a specific version, use the flag --infrastructure hetzner:vX.X.X with the above command.
You can switch back to the management cluster with the following command. This assumes the management cluster's kubeconfig is at ~/.kube/config (which is the default when you set up the bootstrap cluster with kind). If your management kubeconfig lives elsewhere, point KUBECONFIG at that file instead.
export KUBECONFIG=~/.kube/config
Move the objects into the new cluster by using:
clusterctl move --to-kubeconfig $CAPH_WORKER_CLUSTER_KUBECONFIG
Clusterctl Flags:
| Flag | Description |
|---|---|
| --namespace | The namespace where the workload cluster is hosted. If unspecified, the current context's namespace is used. |
| --kubeconfig | Path to the kubeconfig file for the source management cluster. If unspecified, default discovery rules apply. |
| --kubeconfig-context | Context to be used within the kubeconfig file for the source management cluster. If empty, the current context will be used. |
| --to-kubeconfig | Path to the kubeconfig file to use for the destination management cluster. |
| --to-kubeconfig-context | Context to be used within the kubeconfig file for the destination management cluster. If empty, the current context will be used. |
Creating the workload cluster
Provision a Kubernetes workload cluster with essential components for a secure deployment, including CNI, CCM, and optional CSI integration.
Hetzner project preparation
Learn how to do the necessary steps for creating your first workload cluster on Hetzner with Cluster API.