-
Notifications
You must be signed in to change notification settings - Fork 133
docs: new guide on lb without credentials #1186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
lukasmetzner
wants to merge
4
commits into
main
Choose a base branch
from
docs-robot-lb-without-creds
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| # Load Balancer-Only Setup Without Robot API Credentials | ||
|
|
||
| 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. | ||
|
|
||
| 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. | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| - Nodes must be initialized with a provider ID | ||
| - Robot servers must be connected to a vSwitch with an `InternalIP` configured on each Node. | ||
|
|
||
| ## Setup | ||
|
|
||
| 1. Create a secret without Robot credentials: | ||
|
|
||
| ```bash | ||
| export HCLOUD_TOKEN=<your-hcloud-token> | ||
| export HCLOUD_NETWORK=<your-network-id> | ||
| kubectl -n kube-system create secret generic hcloud \ | ||
| --from-literal=token=$HCLOUD_TOKEN \ | ||
| --from-literal=network=$HCLOUD_NETWORK | ||
| ``` | ||
|
|
||
| 2. Install the Helm chart with Robot enabled, node and route controllers disabled, and private IPs configured: | ||
|
|
||
| ```bash | ||
| helm repo add hcloud https://charts.hetzner.cloud | ||
| helm repo update hcloud | ||
| helm install hcloud/hcloud-cloud-controller-manager \ | ||
| --set robot.enabled=true \ | ||
| --set networking.enabled=false \ | ||
| --set env.HCLOUD_NETWORK_ROUTES_ENABLED.value="false" \ | ||
| --set env.HCLOUD_NETWORK.valueFrom.secretKeyRef.name=hcloud \ | ||
| --set env.HCLOUD_NETWORK.valueFrom.secretKeyRef.key=network \ | ||
| --set args='{--controllers=*\,-cloud-node\,-cloud-node-lifecycle}' | ||
| ``` | ||
|
|
||
| 3. Verify that your Robot Nodes have a `ProviderID`: | ||
|
|
||
| ```bash | ||
| kubectl get nodes -o json | jq -r '.items[] | "\(.metadata.name)\t\(.spec.providerID // "N/A")"' | ||
| ``` | ||
|
|
||
| 4. Verify that your Robot Nodes have an `InternalIP`: | ||
|
|
||
| ```bash | ||
| kubectl get nodes -o json | jq -r '.items[] | "\(.metadata.name)\t\(.status.addresses // [])"' | ||
| ``` | ||
|
|
||
| 5. 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. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can also use
-o custom-columnswithjsonpathmagic to get a single table with all three fields: