Hetzner Cloud Connect

September 20, 2020 ยท View on GitHub

golangci-lintDocker

Handles automatically adding servers to load balancers

Usage

All configuration is passed with environment variables. We recommend storing these variables as secrets.

First create a secret containing your hetzner credentials:

---
apiVersion: v1
kind: Secret
metadata:
  name: hcloud
  namespace: kube-system
type: Opaque
stringData:
  token: "{HETZNER_API_TOKEN}"
  loadBalancer: "{LOAD_BALANCER_ID}"

Then deploy the daemonset to your cluster:

kubectl apply -f https://raw.githubusercontent.com/BlueBambooStudios/hcloud-connect/master/deployment/daemonset.yaml

Environment variables

KeyTypeDefaultDescription
HCLOUD_TOKENStringHetzner API token
HCLOUD_ENDPOINTString (Optional)Optional endpoint URL for Hetzner Cloud
HCLOUD_DEBUGBoolean (Optional)FALSEEnable debug loggin
HCLOUD_LOAD_BALANCERStringLoad balancer id
HCLOUD_USE_PRIVATE_NETWORKBoolean (Optional)FALSEUse the private network when attaching targets
NODE_NAMEStringNode name as shown in Hetzner control panel

N.B.

There are no tests, use at your own peril