autoscaler/cluster-autoscaler/cloudprovider/hetzner
Kubernetes Prow Robot b3576e0cdc
Merge pull request #4507 from ByteAlex/hetzner-node-name
Shorten Hetzners node names with hex repr
2022-01-09 19:09:12 -08:00
..
examples CA - Cloud Provider Examples - add ability to list/watch/get namespaces 2021-08-23 15:39:38 +01:00
hcloud-go/hcloud
README.md Fixes to address code review comments 2021-06-22 06:58:15 -04:00
hetzner_cloud_provider.go Increase server create timeout to 5. 2021-11-18 20:23:08 +02:00
hetzner_manager.go Increase server create timeout to 5. 2021-11-18 20:23:08 +02:00
hetzner_node_group.go Merge pull request #4507 from ByteAlex/hetzner-node-name 2022-01-09 19:09:12 -08:00

README.md

Cluster Autoscaler for Hetzner Cloud

The cluster autoscaler for Hetzner Cloud scales worker nodes.

Configuration

HCLOUD_TOKEN Required Hetzner Cloud token.

HCLOUD_CLOUD_INIT Base64 encoded Cloud Init yaml with commands to join the cluster, Sample examples/cloud-init.txt for (Kubernetes 1.20.1)

HCLOUD_IMAGE Defaults to ubuntu-20.04, @see https://docs.hetzner.cloud/#images. You can also use an image ID here (e.g. 15512617), or a label selector associated with a custom snapshot (e.g. customized_ubuntu=true). The most recent snapshot will be used in the latter case.

HCLOUD_NETWORK Default empty , The name of the network that is used in the cluster , @see https://docs.hetzner.cloud/#networks

HCLOUD_SSH_KEY Default empty , This SSH Key will have access to the fresh created server, @see https://docs.hetzner.cloud/#ssh-keys

Node groups must be defined with the --nodes=<min-servers>:<max-servers>:<instance-type>:<region>:<name> flag.

Multiple flags will create multiple node pools. For example:

--nodes=1:10:CPX51:FSN1:pool1
--nodes=1:10:CPX51:NBG1:pool2
--nodes=1:10:CX41:NBG1:pool3

You can find a deployment sample under examples/cluster-autoscaler-run-on-master.yaml. Please be aware that you should change the values within this deployment to reflect your cluster.

Development

Make sure you're inside the root path of the autoscaler repository

1.) Build the cluster-autoscaler binary:

make build-in-docker

2.) Build the docker image:

docker build -t hetzner/cluster-autoscaler:dev .

3.) Push the docker image to Docker hub:

docker push hetzner/cluster-autoscaler:dev