Before setting up the hcloud-cloud-controller-manager you need to configure your cluster appropriately. When creating your cluster you need to provide the kubelet option --cloud-provider=external. How this is done depends on your Kubernetes distribution.
-
Create a read+write API token in the Hetzner Cloud Console as described in this document.
-
Export your Robot credentials and Hetzner Cloud API token as environment variables:
export HCLOUD_TOKEN=<your-hcloud-token>
export ROBOT_USER=<your-robot-user-name>
export ROBOT_PASSWORD=<your-robot-password>
kubectl -n kube-system create secret generic hcloud \
--from-literal=token=$HCLOUD_TOKEN \
--from-literal=robot-user=$ROBOT_USER \
--from-literal=robot-password=$ROBOT_PASSWORD- Install the Helm chart:
helm repo add hcloud https://charts.hetzner.cloud
helm repo update hcloud
helm install hcloud/hcloud-cloud-controller-manager --set robot.enabled=true