Hetzner account preparation

Introduction

Hetzner has two offerings: Hetzner Robot (bare metal) and Hetzner Cloud (virtualized). The Syself Autopilot supports both of them. In case you want to work purely with Hetzner Cloud, you can ignore the bare metal specific preparation.

Step 1: Create Hetzner Project

We assume that you have an account at Hetzner.

Please create a new project via Hetzner Cloud Console.

Step 2: Create API Token

Create an API token inside your Hetzner project with read and write permissions. Store it somewhere safe, we'll be using it in later steps.

Step 3: Upload SSH key to Hetzner Cloud

  1. Create a new SSH key, for example by using this command:

  2. Upload the public key to the Hetzner project.

Optional: Setting up a user for Hetzner Robot (bare metal)

The Robot User is needed for managing bare metal machines. You can create one like this:

  1. Go to robot.hetzner.com
  2. Go to "Settings" (behind "👤")
  3. Go to "Webservice and app settings"
  4. Configure "Webservice/app user"

Step 4: Store all values in environment variables

Store all values that you gathered during the steps above in environment variables. You can omit the bare metal-related values if you only want to use Hetzner Cloud.

You can use "echo", for example echo $SSH_KEY_NAME , to ensure that the values are set correctly.

Step 5: Create Secrets in Management Cluster

To create Kubernetes clusters in your Hetzner account, you need to create secrets in the management cluster.

Secret for accessing Hetzner API

Create the secret "hetzner" in the following way:

Optional: Secret for bare metal servers

Hetzner UI showing how to add Robot SSH to Management Cluster

Bare metal servers get provisioned with SSH. Therefore, you need to create another secret:

Via kubectl get secrets you can check that the secrets got created as intended.

Next
Introduction to Syself Autopilot