Skip to content

Commit 2524313

Browse files
lukasmetznerjooola
andauthored
docs: new guide on lb without credentials (#1186)
Co-authored-by: Jonas L. <jooola@users.noreply.github.com>
1 parent c3cb5a6 commit 2524313

File tree

4 files changed

+49
-16
lines changed

4 files changed

+49
-16
lines changed

docs/explanation/robot-support.md

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -52,20 +52,8 @@ _This means that by default, your **Hostname** needs to be the **name of the ser
5252

5353
## Credentials
5454

55-
Robot API credentials (`ROBOT_USER` / `ROBOT_PASSWORD`) are **optional**. They control which features are available:
56-
57-
### With Credentials
58-
59-
All features described above are available: the Node Controller sets labels and addresses from the Robot API, the Node Lifecycle Controller manages shutdown detection and node deletion, and the Service Controller adds Robot servers as Load Balancer targets.
55+
Robot API credentials (`ROBOT_USER` / `ROBOT_PASSWORD`) are required for full functionality. All features described above — Node Controller labels and addresses, Node Lifecycle Controller shutdown detection, and Service Controller Load Balancer targets — depend on Robot API access.
6056

6157
If you only plan to use a single Robot server, you can also use an "Admin login" (see the `Admin login` tab on the [server administration page](https://robot.hetzner.com/server)) for this server instead of the account credentials.
6258

63-
### Without Credentials
64-
65-
When `robot.enabled` is set to `true` but no `ROBOT_USER` / `ROBOT_PASSWORD` are provided, the HCCM operates in a limited mode:
66-
67-
- **Service Controller (Load Balancers)**: Fully functional. Robot servers with `hrobot://` provider IDs are added as IP targets using their `InternalIP` from the Kubernetes Node object. This is ideal for setups where Robot servers are connected via a vSwitch and only the Load Balancer integration is needed.
68-
- **Node Controller**: Must be disabled (`--controllers=*,-cloud-node,-cloud-node-lifecycle`), as it requires the Robot API to fetch server metadata.
69-
- **Node Lifecycle Controller**: Must be disabled (same flag as above).
70-
71-
This mode is useful when you manage nodes externally (e.g., via Talos or another provisioning tool) and only need the CCM for Load Balancer target management. It avoids exposing account-wide Robot API credentials to the cluster.
59+
> **Running without credentials:** If you manage nodes externally (e.g., via Talos) and only need the Load Balancer controller, you can omit Robot API credentials. The HCCM will derive targets from the Kubernetes Node's `InternalIP` instead. This requires `use-private-ip` and disabling the node controllers. See the [LB-only without credentials guide](../guides/robot/lb-only-without-credentials.md) for setup instructions.

docs/guides/robot/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ In this folder, you should find guides for you to accomplish specific tasks with
44

55
- [Quickstart](quickstart.md)
66
- [Private Networks](private-networks.md)
7+
- [Load Balancer Only Without Credentials](lb-only-without-credentials.md)
78
- [Migrating from Syself](migrating-from-syself.md)
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
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.

docs/guides/robot/private-networks.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ As a result, the annotation `load-balancer.hetzner.cloud/use-private-ip` can be
66

77
## Prerequisite
88

9-
Enable Robot support as outlined in the [Robot setup guide](./quickstart.md). For a Robot server we pass along configured InternalIPs, that do not appear as an ExternalIP and are within the configured address family. Check with `kubectl get nodes -o json | jq ".items.[].status.addresses"` if you have configured an InternalIP.
9+
Enable Robot support as outlined in the [Robot setup guide](./quickstart.md). As mentioned there, for a Robot server we pass along configured InternalIPs, that do not appear as an ExternalIP and are within the configured address family. Check with `kubectl get nodes -o json | jq ".items.[].status.addresses"` if you have configured an InternalIP.
1010

11-
Robot API credentials (`ROBOT_USER` / `ROBOT_PASSWORD`) are optional for this use case. When credentials are not provided, the HCCM derives IP targets directly from the Kubernetes Node's `InternalIP` instead of querying the Robot API. This requires disabling the node controllers: `--controllers=*,-cloud-node,-cloud-node-lifecycle`. See the [Robot Support explanation](../../explanation/robot-support.md#without-credentials) for details.
11+
> If you don't need Robot API credentials for this setup, see the [LB-only without credentials guide](./lb-only-without-credentials.md).
1212
1313
## Configuration
1414

0 commit comments

Comments
 (0)