|
| 1 | +# Load Balancer-Only Setup Without Robot API Credentials |
| 2 | + |
| 3 | +If you manage Robot nodes externally (e.g., via Talos or another provisioning tool) and only need the HCCM to add Robot servers as Load Balancer IP targets, you can run without Robot API credentials. This avoids exposing account-wide Robot API credentials to the cluster. |
| 4 | + |
| 5 | +In this mode, the HCCM derives Load Balancer targets from the Kubernetes Node's `InternalIP` instead of querying the Robot API. The Node Controller and Node Lifecycle Controller are not available, as they require the Robot API to fetch server metadata. |
| 6 | + |
| 7 | +## Prerequisites |
| 8 | + |
| 9 | +- Nodes must be initialized with a provider ID |
| 10 | +- Robot servers must be connected to a vSwitch with an `InternalIP` configured on each Node. |
| 11 | + |
| 12 | +## Setup |
| 13 | + |
| 14 | +1. Create a secret without Robot credentials: |
| 15 | + |
| 16 | +```bash |
| 17 | +export HCLOUD_TOKEN=<your-hcloud-token> |
| 18 | +export HCLOUD_NETWORK=<your-network-id> |
| 19 | +kubectl -n kube-system create secret generic hcloud \ |
| 20 | + --from-literal=token=$HCLOUD_TOKEN \ |
| 21 | + --from-literal=network=$HCLOUD_NETWORK |
| 22 | +``` |
| 23 | + |
| 24 | +2. Install the Helm chart with Robot enabled, node and route controllers disabled, and private IPs configured: |
| 25 | + |
| 26 | +```bash |
| 27 | +helm repo add hcloud https://charts.hetzner.cloud |
| 28 | +helm repo update hcloud |
| 29 | +helm install hcloud/hcloud-cloud-controller-manager \ |
| 30 | + --set robot.enabled=true \ |
| 31 | + --set networking.enabled=false \ |
| 32 | + --set env.HCLOUD_NETWORK_ROUTES_ENABLED.value="false" \ |
| 33 | + --set env.HCLOUD_NETWORK.valueFrom.secretKeyRef.name=hcloud \ |
| 34 | + --set env.HCLOUD_NETWORK.valueFrom.secretKeyRef.key=network \ |
| 35 | + --set args='{--controllers=*\,-cloud-node\,-cloud-node-lifecycle}' |
| 36 | +``` |
| 37 | + |
| 38 | +3. Verify that your Robot Nodes have a `ProviderID` and an `InternalIP`: |
| 39 | + |
| 40 | +```bash |
| 41 | +kubectl get nodes -o 'custom-columns=NAME:.metadata.name,PROVIDER-ID:.spec.providerID,INTERNAL-IP:.status.addresses[?(@.type=="InternalIP")].address' |
| 42 | +``` |
| 43 | + |
| 44 | +4. Annotate your Services with `load-balancer.hetzner.cloud/use-private-ip: "true"` to use the `InternalIP` as the Load Balancer target. See the [Private Networks guide](./private-networks.md) for more details. |
0 commit comments